We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f7c2f6 commit 67786b2Copy full SHA for 67786b2
contracts/tree.sol
@@ -61,7 +61,11 @@ library PatriciaTree {
61
// where we have branch nodes (bit in key denotes direction)
62
// - bytes32[] hashes - hashes of sibling edges
63
function getProof(Tree storage tree, bytes key) internal view returns (uint branchMask, bytes32[] _siblings) {
64
- D.Label memory k = D.Label(keccak256(key), 256);
+ return getProofWithHashedKey(tree, keccak256(key));
65
+ }
66
+
67
+ function getProofWithHashedKey(Tree storage tree, bytes32 hashedKey) internal view returns (uint branchMask, bytes32[] _siblings) {
68
+ D.Label memory k = D.Label(hashedKey, 256);
69
D.Edge memory e = tree.rootEdge;
70
bytes32[256] memory siblings;
71
uint length;
0 commit comments