From 282307e0b3d37e815de6bba7c513a76bc3be89e3 Mon Sep 17 00:00:00 2001 From: jeff washington Date: Mon, 2 Jan 2023 12:36:25 -0600 Subject: [PATCH] simplify get_storages_for_slot --- runtime/src/accounts_db.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 8d526982da87f0..4ff464cae89bf3 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -4285,15 +4285,7 @@ impl AccountsDb { } fn get_storages_for_slot(&self, slot: Slot) -> Option { - self.storage.get(&slot).map(|storages| { - // per slot, get the storages. There should usually only be 1. - storages - .read() - .unwrap() - .values() - .cloned() - .collect::>() - }) + self.storage.get_slot_storage_entries(slot) } /// 'accounts' that exist in the current slot we are combining into a different ancient slot