Skip to content

Commit 969dd83

Browse files
committed
Add verification before failing recursive generation
1 parent 2fdeeea commit 969dd83

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

how-to/recursive-proofs/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ async function start() {
7171
({ witness, returnValue } = await recurseLeaf.noir.execute(nodeParams));
7272
console.log("recurseLeaf: %d + %d = ", a, b, Number(returnValue).toString());
7373
const innerProof2: ProofData = await recurseLeaf.backend.generateProof(witness);
74+
console.log("Verifying intermediate proof recurseLeaf...");
75+
const res: boolean = await recurseLeaf.backend.verifyProof(innerProof2);
76+
console.log("Verification", res ? "PASSED" : "failed");
77+
7478
console.log("Generating intermediate proof artifacts recurseLeaf...");
7579
const artifacts2 = await recurseLeaf.backend.generateRecursiveProofArtifacts(
7680
innerProof2,

0 commit comments

Comments
 (0)