Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dmakarov committed Aug 1, 2024
1 parent 437182c commit 4f1994d
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2832,7 +2832,7 @@ impl AccountsDb {
if let Some(failed_slot) = failed_slot.take() {
info!("calc_delete_dependencies, oldest slot is not able to be deleted because of {pubkey} in slot {failed_slot}");
} else {
info!("calc_delete_dependencies, oldest slot is not able to be deleted because of {pubkey}, slot_list len: {}, ref count: {ref_count}", slot_list.len());
info!("calc_delete_dependencies, oldest slot is not able to be deleted because of {pubkey}, slot list len: {}, ref count: {ref_count}", slot_list.len());
}
}

Expand Down Expand Up @@ -3484,18 +3484,22 @@ impl AccountsDb {
let candidates_bin = candidates_bin.read().unwrap();
let mut bin_set = candidates_bin
.iter()
.map(|(pubkey, cleaning_info)| {
.filter_map(|(pubkey, cleaning_info)| {
let CleaningInfo {
slot_list,
ref_count: _,
} = cleaning_info;
(
*pubkey,
slot_list
.iter()
.map(|(slot, _)| *slot)
.collect::<HashSet<Slot>>(),
)
if slot_list.is_empty() {
None
} else {
Some((
*pubkey,
slot_list
.iter()
.map(|(slot, _)| *slot)
.collect::<HashSet<Slot>>(),
))
}
})
.collect::<Vec<_>>();
pubkey_to_slot_set.append(&mut bin_set);
Expand Down

0 comments on commit 4f1994d

Please sign in to comment.