Skip to content

Commit

Permalink
Fix handling single circuit
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Zhang <[email protected]>
  • Loading branch information
jimthematrix committed Aug 14, 2024
1 parent 6c4b904 commit ab55889
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zkp/circuits/gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const specificCircuits = argv.c;
const compileOnly = argv.compileOnly;
const parallelLimit = parseInt(process.env.GEN_CONCURRENCY, 10) || 10; // Default to compile 10 circuits in parallel

console.log(argv);

// check env vars
if (!circuitsRoot) {
console.error('Error: CIRCUITS_ROOT is not set.');
Expand Down Expand Up @@ -114,8 +116,8 @@ const processCircuit = async (circuit, ptau, skipSolidityGenaration) => {
};

const run = async () => {
let onlyCircuits = specificCircuits;
if (specificCircuits) {
let onlyCircuits = specificCircuits;
if (!Array.isArray(specificCircuits)) {
onlyCircuits = [specificCircuits];
}
Expand All @@ -133,7 +135,7 @@ const run = async () => {
const activePromises = new Set();

for (const [circuit, { ptau, skipSolidityGenaration }] of circuitsArray) {
if (specificCircuits && !specificCircuits.includes(circuit)) {
if (onlyCircuits && !onlyCircuits.includes(circuit)) {
continue;
}

Expand Down

0 comments on commit ab55889

Please sign in to comment.