mirror of
https://github.com/privacy-scaling-explorations/zk-kit.git
synced 2026-04-22 03:00:15 -04:00
fix(incremental-merkle-tree.sol): ensure proofPathIndices is binary when recovering updateIndex
This commit is contained in:
@@ -102,7 +102,7 @@ library IncrementalBinaryTree {
|
||||
|
||||
uint256 updateIndex;
|
||||
for (uint8 i = 0; i < depth; ) {
|
||||
updateIndex |= uint(proofPathIndices[i]) << uint(i);
|
||||
updateIndex |= uint(proofPathIndices[i] & 1) << uint(i);
|
||||
if (proofPathIndices[i] == 0) {
|
||||
if (proofSiblings[i] == self.lastSubtrees[i][1]) {
|
||||
self.lastSubtrees[i][0] = hash;
|
||||
|
||||
Reference in New Issue
Block a user