Sparse Merkle tree working

This commit is contained in:
Jordi Baylina
2018-12-15 09:15:58 +01:00
parent 09f36d1e4d
commit 6d6558370f
7 changed files with 29 additions and 85588 deletions

View File

@@ -51,7 +51,7 @@ async function testExclusion(tree, key, circuit) {
isOld0: res.isOld0 ? 1 : 0,
key: key,
value: 0
}, console.log);
});
assert(circuit.checkWitness(w));
}
@@ -82,13 +82,13 @@ describe("SMT test", function () {
});
it("Check exclussion in a tree of 3", async () => {
// await testExclusion(tree, 0, circuit);
await testExclusion(tree, 0, circuit);
await testExclusion(tree, 6, circuit);
/* await testExclusion(tree, 9, circuit);
await testExclusion(tree, 9, circuit);
await testExclusion(tree, 33, circuit);
await testExclusion(tree, 31, circuit);
await testExclusion(tree, 16, circuit);
await testExclusion(tree, 64, circuit); */
await testExclusion(tree, 64, circuit);
});