From 1e47aacd0d73bd3ee9b3caca232af6a3df79969e Mon Sep 17 00:00:00 2001 From: Brooks Date: Fri, 23 Feb 2024 17:25:30 -0500 Subject: [PATCH] Removes get_account_read_entry() (#35309) --- accounts-db/src/accounts_index.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/accounts-db/src/accounts_index.rs b/accounts-db/src/accounts_index.rs index 266e9d74e..a515dff54 100644 --- a/accounts-db/src/accounts_index.rs +++ b/accounts-db/src/accounts_index.rs @@ -1124,12 +1124,6 @@ impl + Into> AccountsIndex { } } - pub fn get_account_read_entry(&self, pubkey: &Pubkey) -> Option> { - let lock = self.get_bin(pubkey); - lock.get(pubkey) - .map(ReadAccountMapEntry::from_account_map_entry) - } - /// Gets the index's entry for `pubkey` and applies `callback` to it /// /// If `callback`'s boolean return value is true, add this entry to the in-mem cache. @@ -1457,7 +1451,12 @@ impl + Into> AccountsIndex { ancestors: Option<&Ancestors>, max_root: Option, ) -> AccountIndexGetResult { - self.get_account_read_entry(pubkey) + let read_account_map_entry = self + .get_bin(pubkey) + .get(pubkey) + .map(ReadAccountMapEntry::from_account_map_entry); + + read_account_map_entry .and_then(|locked_entry| { let slot_list = locked_entry.slot_list(); self.latest_slot(ancestors, slot_list, max_root)