lift store.slot() from loop (#20409)

This commit is contained in:
Jeff Washington (jwash) 2021-10-04 17:07:01 -04:00 committed by GitHub
parent 196cc8cfdf
commit b6a6d6986d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -5857,9 +5857,10 @@ impl AccountsDb {
.into_par_iter()
.map(|store| {
let accounts = store.all_accounts();
let slot = store.slot();
accounts
.into_iter()
.map(|account| (store.slot(), account.meta.pubkey))
.map(|account| (slot, account.meta.pubkey))
.collect::<HashSet<(Slot, Pubkey)>>()
})
.reduce(HashSet::new, |mut reduced, store_pubkeys| {