Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
joshieDo committed Sep 21, 2024
1 parent 094e761 commit 6cdee2e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions crates/storage/provider/src/providers/static_file/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,8 @@ mod tests {

// Ensure transaction index
let tx_index = sf_rw.tx_index().read();
let expected_tx_index = vec![
(8, SegmentRangeInclusive::new(0, 9)),
(9, SegmentRangeInclusive::new(20, 29)),
];
let expected_tx_index =
vec![(8, SegmentRangeInclusive::new(0, 9)), (9, SegmentRangeInclusive::new(20, 29))];
assert_eq!(
tx_index.get(&segment).map(|index| index.iter().map(|(k, v)| (*k, *v)).collect()),
(!expected_tx_index.is_empty()).then_some(expected_tx_index),
Expand Down Expand Up @@ -516,7 +514,13 @@ mod tests {
vec![(highest_tx - 1, SegmentRangeInclusive::new(0, 9))],
), /* includes lockfile */
// Case 2: Prune most txs up to block 1.
(highest_tx - 1, 1, Some(0), files_per_range + 1, vec![(0, SegmentRangeInclusive::new(0, 1))]),
(
highest_tx - 1,
1,
Some(0),
files_per_range + 1,
vec![(0, SegmentRangeInclusive::new(0, 1))],
),
// Case 3: Prune remaining tx and ensure that file is not deleted.
(1, 0, None, files_per_range + 1, vec![]),
];
Expand Down

0 comments on commit 6cdee2e

Please sign in to comment.