Skip to content

Commit

Permalink
Renames var to should_collect_reclaims (#3985)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Dec 9, 2024
1 parent e4979e3 commit a2fb9d1
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 @@ -2831,7 +2831,7 @@ impl AccountsDb {
// closure passed to scan thus making
// conflicting read and write borrows.
candidates_bin.retain(|candidate_pubkey, candidate_info| {
let mut should_purge = false;
let mut should_collect_reclaims = false;
self.accounts_index.scan(
[*candidate_pubkey].iter(),
|_candidate_pubkey, slot_list_and_ref_count, _entry| {
Expand Down Expand Up @@ -2871,8 +2871,8 @@ impl AccountsDb {
assert!(slot <= &max_clean_root_inclusive);
}
if slot_list.len() > 1 {
// no need to purge old accounts if there is only 1 slot in the slot list
should_purge = true;
// no need to reclaim old accounts if there is only 1 slot in the slot list
should_collect_reclaims = true;
purges_old_accounts_local += 1;
useless = false;
} else {
Expand All @@ -2890,7 +2890,7 @@ impl AccountsDb {
// it was in the dirty list, so we assume that the slot it was
// touched in must be unrooted.
not_found_on_fork += 1;
should_purge = true;
should_collect_reclaims = true;
purges_old_accounts_local += 1;
useless = false;
}
Expand All @@ -2911,7 +2911,7 @@ impl AccountsDb {
self.scan_filter_for_shrinking
},
);
if should_purge {
if should_collect_reclaims {
let reclaims_new = self.collect_reclaims(
candidate_pubkey,
max_clean_root_inclusive,
Expand Down

0 comments on commit a2fb9d1

Please sign in to comment.