Skip to content

Commit

Permalink
simplify get_storages_for_slot (solana-labs#29463)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored and gnapoli23 committed Jan 10, 2023
1 parent b1acb2f commit 61b1f72
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4288,15 +4288,7 @@ impl AccountsDb {
}

fn get_storages_for_slot(&self, slot: Slot) -> Option<SnapshotStorage> {
self.storage.get(&slot).map(|storages| {
// per slot, get the storages. There should usually only be 1.
storages
.read()
.unwrap()
.values()
.cloned()
.collect::<Vec<_>>()
})
self.storage.get_slot_storage_entries(slot)
}

/// 'accounts' that exist in the current slot we are combining into a different ancient slot
Expand Down

0 comments on commit 61b1f72

Please sign in to comment.