From 8d9d6b62d95419c935481f6c2c3d52729eac50f5 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" <75863576+jeffwashington@users.noreply.github.com> Date: Thu, 22 Apr 2021 12:54:08 -0500 Subject: [PATCH] use cheaper account get (#16682) --- runtime/src/accounts_db.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index bbb68983d0..9982dfb322 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -1879,7 +1879,7 @@ impl AccountsDb { stored_accounts .iter() .filter(|(pubkey, stored_account)| { - if let Some((locked_entry, _)) = self.accounts_index.get(pubkey, None, None) { + if let Some(locked_entry) = self.accounts_index.get_account_read_entry(pubkey) { let is_alive = locked_entry.slot_list().iter().any(|(_slot, i)| { i.store_id == stored_account.store_id && i.offset == stored_account.account.offset @@ -5117,7 +5117,7 @@ impl AccountsDb { offset, .. } = stored_account; - if let Some((locked_entry, _)) = self.accounts_index.get(pubkey, None, None) { + if let Some(locked_entry) = self.accounts_index.get_account_read_entry(pubkey) { let is_alive = locked_entry .slot_list() .iter()