From fc8cd8230982482c84e855f62958474979b8d0f8 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" Date: Wed, 4 Jan 2023 15:12:48 -0600 Subject: [PATCH] migrate tests to get_slot_storage_entry (#29515) --- 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 7383b7ee872e6c..fb7dadab37ee23 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() }