Skip to content

Commit

Permalink
refactor(imt.sol): use the cached tree depth
Browse files Browse the repository at this point in the history
  • Loading branch information
vplasencia committed Mar 20, 2024
1 parent 22b6a12 commit 4d5bf81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/imt.sol/contracts/internal/InternalLeanIMT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ library InternalLeanIMT {
// A new insertion can increase a tree's depth by at most 1,
// and only if the number of leaves supported by the current
// depth is less than the number of leaves to be supported after insertion.
if (2 ** self.depth < index + 1) {
if (2 ** treeDepth < index + 1) {
++treeDepth;
}

Expand Down

0 comments on commit 4d5bf81

Please sign in to comment.