Skip to content

Commit

Permalink
snapshot from zero
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Jan 25, 2024
1 parent 076926b commit 99077c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/snapshot/src/snapshotter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl<DB: Database> Snapshotter<DB> {
highest_snapshot: Option<BlockNumber>,
finalized_block_number: BlockNumber,
) -> Option<RangeInclusive<BlockNumber>> {
let range = highest_snapshot.unwrap_or_default() + 1..=finalized_block_number;
let range = highest_snapshot.map_or(0, |block| block + 1)..=finalized_block_number;
(!range.is_empty()).then_some(range)
}
}
Expand Down

0 comments on commit 99077c4

Please sign in to comment.