Skip to content

Commit

Permalink
Removes index's root check in get_snapshot_storages() (#3784)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Dec 2, 2024
1 parent f3405d8 commit 1258701
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8475,20 +8475,9 @@ impl AccountsDb {
requested_slots: impl RangeBounds<Slot> + Sync,
) -> (Vec<Arc<AccountStorageEntry>>, Vec<Slot>) {
let start = Instant::now();
let max_alive_root_exclusive = self
.accounts_index
.roots_tracker
.read()
.unwrap()
.alive_roots
.max_exclusive();
let (slots, storages) = self
.storage
.get_if(|slot, storage| {
(*slot < max_alive_root_exclusive)
&& requested_slots.contains(slot)
&& storage.has_accounts()
})
.get_if(|slot, storage| requested_slots.contains(slot) && storage.has_accounts())
.into_vec()
.into_iter()
.unzip();
Expand Down

0 comments on commit 1258701

Please sign in to comment.