Skip to content

Commit

Permalink
clarify range check
Browse files Browse the repository at this point in the history
grooviegermanikus committed Nov 14, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 99ec11d commit d5f3b47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion history/src/block_stores/multiple_strategy_block_store.rs
Original file line number Diff line number Diff line change
@@ -179,7 +179,8 @@ impl BlockStorageInterface for MultipleStrategyBlockStorage {
let persistent_storage_range = self.persistent_block_storage.get_slot_range().await;
// x------
// |------x
if lower - persistent_storage_range.end() <= 1 {
let gap = lower - persistent_storage_range.end() - 1 ;
if !gap > 0 {
// move the lower bound to the left
lower = lower.min(*persistent_storage_range.start());
}

0 comments on commit d5f3b47

Please sign in to comment.