Skip to content

Commit

Permalink
Fix bug for moving up rows
Browse files Browse the repository at this point in the history
  • Loading branch information
kcalvinalvin committed Sep 5, 2022
1 parent 3eec8f8 commit 80a4310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytreexo.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def calculate_roots(numleaves: int, dels: [bytes], proof: Proof) -> [bytes]:
pos = proof.targets.pop(0) if index == 0 else next_positions.pop(0)
cur_hash = dels.pop(0) if index == 0 else next_hashes.pop(0)

if pos > row_maxpos(row, total_rows):
while pos > row_maxpos(row, total_rows):
row += 1

if isroot(pos, numleaves, row, total_rows):
Expand Down

0 comments on commit 80a4310

Please sign in to comment.