From 9523b31ea4160bf39c4b8fd536aa950433eaf25c Mon Sep 17 00:00:00 2001 From: jeff washington Date: Wed, 4 Jan 2023 12:43:10 -0600 Subject: [PATCH] migrate tests to get_slot_storage_entry --- runtime/src/accounts_db.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 28d8006dd84e9b..eda48679b57d5a 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -4249,17 +4249,14 @@ impl AccountsDb { #[cfg(test)] pub(crate) fn sizes_of_accounts_in_storage_for_tests(&self, slot: Slot) -> Vec { - self.get_storages_for_slot(slot) - .map(|storages| { - storages - .iter() - .flat_map(|storage| { - storage - .accounts - .account_iter() - .map(|account| account.stored_size) - }) - .collect::>() + self.storage + .get_slot_storage_entry(slot) + .map(|storage| { + storage + .accounts + .account_iter() + .map(|account| account.stored_size) + .collect() }) .unwrap_or_default() }