rename MerkleTree to make more clear that it has no output

This commit is contained in:
poma 2019-11-24 13:29:57 +04:00
parent 0c4c27b7b6
commit a58d60623b
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ template DualMux() {
// Verifies that merkle proof is correct for given merkle root and a leaf // Verifies that merkle proof is correct for given merkle root and a leaf
// pathIndices input is an array of 0/1 selectors telling whether given pathElement is on the left or right side of merkle path // pathIndices input is an array of 0/1 selectors telling whether given pathElement is on the left or right side of merkle path
template MerkleTree(levels) { template MerkleTreeChecker(levels) {
signal input leaf; signal input leaf;
signal input root; signal input root;
signal input pathElements[levels]; signal input pathElements[levels];

View File

@ -43,7 +43,7 @@ template Withdraw(levels) {
hasher.secret <== secret; hasher.secret <== secret;
hasher.nullifierHash === nullifierHash; hasher.nullifierHash === nullifierHash;
component tree = MerkleTree(levels); component tree = MerkleTreeChecker(levels);
tree.leaf <== hasher.commitment; tree.leaf <== hasher.commitment;
tree.root <== root; tree.root <== root;
for (var i = 0; i < levels; i++) { for (var i = 0; i < levels; i++) {