Skip to content

Commit

Permalink
fix: mod NUM_BLOCKS in block deletion loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
reednaa committed Oct 11, 2024
1 parent c98c043 commit 874920a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BtcPrism.sol
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ contract BtcPrism is IBtcPrism {
// erase any block hashes above newHeight, now invalidated.
// (in case we just accepted a shorter, heavier chain.)
for (uint256 i = newHeight + 1; i <= latestBlockHeight; ++i) {
blockHashes[i % MAX_ALLOWED_REORG] = 0;
blockHashes[i % NUM_BLOCKS] = 0;
}

emit NewTotalDifficultySinceRetarget(
Expand Down

0 comments on commit 874920a

Please sign in to comment.