Skip to content

Commit

Permalink
replace one accounts iter with scan_pubkeys (solana-labs#888)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored Apr 19, 2024
1 parent 86667f5 commit f0e87f6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8058,11 +8058,11 @@ impl AccountsDb {
.into_par_iter()
.map(|store| {
let slot = store.slot();
store
.accounts
.account_iter()
.map(|account| (slot, *account.pubkey()))
.collect::<Vec<(Slot, Pubkey)>>()
let mut pubkeys = Vec::with_capacity(store.count());
store.accounts.scan_pubkeys(|pubkey| {
pubkeys.push((slot, *pubkey));
});
pubkeys
})
.flatten()
.collect::<HashSet<_>>()
Expand Down

0 comments on commit f0e87f6

Please sign in to comment.