Simplifies adding uncleaned pubkeys during index generation (#34007)
This commit is contained in:
parent
a96be5d2f0
commit
9f25f67e60
|
@ -71,10 +71,7 @@ use {
|
|||
},
|
||||
blake3::traits::digest::Digest,
|
||||
crossbeam_channel::{unbounded, Receiver, Sender},
|
||||
dashmap::{
|
||||
mapref::entry::Entry::{Occupied, Vacant},
|
||||
DashMap, DashSet,
|
||||
},
|
||||
dashmap::{DashMap, DashSet},
|
||||
log::*,
|
||||
rand::{thread_rng, Rng},
|
||||
rayon::{prelude::*, ThreadPool},
|
||||
|
@ -9368,12 +9365,7 @@ impl AccountsDb {
|
|||
let unique_keys =
|
||||
HashSet::<Pubkey>::from_iter(slot_keys.iter().map(|(_, key)| *key));
|
||||
for (slot, key) in slot_keys {
|
||||
match self.uncleaned_pubkeys.entry(slot) {
|
||||
Occupied(mut occupied) => occupied.get_mut().push(key),
|
||||
Vacant(vacant) => {
|
||||
vacant.insert(vec![key]);
|
||||
}
|
||||
}
|
||||
self.uncleaned_pubkeys.entry(slot).or_default().push(key);
|
||||
}
|
||||
let unique_pubkeys_by_bin_inner =
|
||||
unique_keys.into_iter().collect::<Vec<_>>();
|
||||
|
|
Loading…
Reference in New Issue