Skip to content

Commit

Permalink
account_iter instead of accounts() (solana-labs#27252)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored Aug 22, 2022
1 parent 7c01c1e commit 5272a28
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7581,17 +7581,15 @@ impl AccountsDb {
stores
.into_par_iter()
.map(|store| {
let accounts = store.all_accounts();
let slot = store.slot();
accounts
.into_iter()
store
.accounts
.account_iter()
.map(|account| (slot, account.meta.pubkey))
.collect::<HashSet<(Slot, Pubkey)>>()
})
.reduce(HashSet::new, |mut reduced, store_pubkeys| {
reduced.extend(store_pubkeys);
reduced
.collect::<Vec<(Slot, Pubkey)>>()
})
.flatten()
.collect::<HashSet<_>>()
})
};
self.remove_dead_slots_metadata(
Expand Down

0 comments on commit 5272a28

Please sign in to comment.