Skip to content

Commit

Permalink
Replaces ReadAccountMapEntry in do_scan_secondary_index() (#35219)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Feb 28, 2024
1 parent 695fe1e commit f340c1c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions accounts-db/src/accounts_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1110,17 +1110,17 @@ impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> AccountsIndex<T, U> {
F: FnMut(&Pubkey, (&T, Slot)),
{
for pubkey in index.get(index_key) {
// Maybe these reads from the AccountsIndex can be batched every time it
// grabs the read lock as well...
if let AccountIndexGetResult::Found(list_r, index) =
self.get(&pubkey, Some(ancestors), max_root)
{
let entry = &list_r.slot_list()[index];
func(&pubkey, (&entry.1, entry.0));
}
if config.is_aborted() {
break;
}
if let Some(entry) = self.get_cloned(&pubkey) {
self.get_account_info_with_and_then(
&entry,
Some(ancestors),
max_root,
|(slot, account_info)| func(&pubkey, (&account_info, slot)),
);
};
}
}

Expand Down

0 comments on commit f340c1c

Please sign in to comment.