Skip to content

Commit

Permalink
Fix off by one in reconstruction
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed Jun 16, 2023
1 parent 719e7ee commit ba7ad3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beacon_node/store/src/reconstruct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ where

// If `num_blocks` is not specified iterate all blocks.
let block_root_iter = self
.forwards_block_roots_iterator_until(lower_limit_slot, upper_limit_slot, || {
.forwards_block_roots_iterator_until(lower_limit_slot, upper_limit_slot - 1, || {
panic!("FIXME(sproul): reconstruction doesn't need this state")
})?
.take(num_blocks.unwrap_or(usize::MAX));
Expand Down

0 comments on commit ba7ad3e

Please sign in to comment.