Skip to content

Commit

Permalink
fix: build_tree iteration condition change
Browse files Browse the repository at this point in the history
  • Loading branch information
JordyRo1 committed Jul 11, 2024
1 parent e6388f3 commit 0067e29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/src/contracts/hooks/merkle_tree_hook.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ pub mod merkle_tree_hook {
let mut cur_idx = 0;
let mut tree = array![];
loop {
if (cur_idx == self.count.read() - 1) {
break ();
if (cur_idx >= TREE_DEPTH) {
break;
}
tree.append(self.tree.read(cur_idx));
cur_idx += 1;
Expand Down

0 comments on commit 0067e29

Please sign in to comment.