Skip to content

Commit

Permalink
Fix PublicDataProof error
Browse files Browse the repository at this point in the history
  • Loading branch information
weiqiushi committed Jan 2, 2024
1 parent 8cf366b commit 6f62e5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/PublicDataProof.sol
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ library PublicDataProof {
if (proof[i] != bytes32(0)) {
if (leaf_index % 2 == 0) {
computedHash = _efficientKeccak256(currentHash, proof[i]);

} else {
computedHash = _efficientKeccak256(proof[i], currentHash);
}
currentHash = _bytes32To16(computedHash);
}
currentHash = _bytes32To16(computedHash);

//require(leaf_index >= 2, "invalid leaf_index");
leaf_index = leaf_index / 2;
Expand Down

0 comments on commit 6f62e5f

Please sign in to comment.