Skip to content

Commit

Permalink
clarify range check
Browse files Browse the repository at this point in the history
  • Loading branch information
grooviegermanikus committed Nov 14, 2023
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
Expand Up @@ -179,7 +179,8 @@ impl BlockStorageInterface for MultipleStrategyBlockStorage {
let persistent_storage_range = self.persistent_block_storage.get_slot_range().await;

Check warning on line 179 in history/src/block_stores/multiple_strategy_block_store.rs

View workflow job for this annotation

GitHub Actions / lite-rpc full build

Diff in /home/runner/work/lite-rpc/lite-rpc/history/src/block_stores/multiple_strategy_block_store.rs

Check warning on line 179 in history/src/block_stores/multiple_strategy_block_store.rs

View workflow job for this annotation

GitHub Actions / lite-rpc full build

Diff in /home/runner/work/lite-rpc/lite-rpc/history/src/block_stores/multiple_strategy_block_store.rs
// 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());
}
Expand Down

0 comments on commit d5f3b47

Please sign in to comment.