simplify get_storages_for_slot (#29463)

This commit is contained in:
Jeff Washington (jwash) 2023-01-02 14:38:48 -06:00 committed by GitHub
parent 38d771a823
commit 8397f295c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 9 deletions

View File

@ -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