Skip to content

Commit

Permalink
fix cargo version difference
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington committed Sep 15, 2022
1 parent 0aee736 commit 0ed7cf4
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2173,8 +2173,11 @@ impl AccountsDb {
.filter_map(|pubkeys: &[Pubkey]| {
let mut reclaims = Vec::new();
for pubkey in pubkeys {
let removed_from_index = self.accounts_index
.clean_rooted_entries(pubkey, &mut reclaims, max_clean_root);
let removed_from_index = self.accounts_index.clean_rooted_entries(
pubkey,
&mut reclaims,
max_clean_root,
);

if removed_from_index {
pubkeys_removed_from_accounts_index
Expand Down Expand Up @@ -2674,11 +2677,12 @@ impl AccountsDb {
accounts_scan.stop();

let mut clean_old_rooted = Measure::start("clean_old_roots");
let ((purged_account_slots, removed_accounts), mut pubkeys_removed_from_accounts_index) = self.clean_accounts_older_than_root(
purges_old_accounts,
max_clean_root,
&ancient_account_cleans,
);
let ((purged_account_slots, removed_accounts), mut pubkeys_removed_from_accounts_index) =
self.clean_accounts_older_than_root(
purges_old_accounts,
max_clean_root,
&ancient_account_cleans,
);

if self.caching_enabled {
self.do_reset_uncleaned_roots(max_clean_root);
Expand Down Expand Up @@ -7556,9 +7560,9 @@ impl AccountsDb {
// filter out pubkeys that have already been removed from the accounts index in a previous step
let already_removed =
pubkeys_removed_from_accounts_index.contains(pubkey);
(!already_removed).then_some(pubkey)
(!already_removed).then(|| pubkey)
}),
|_pubkey, _slots_refs| AccountsIndexScanResult::Unref,
|_pubkey, _slots_refs| AccountsIndexScanResult::Unref,
)
})
});
Expand Down

0 comments on commit 0ed7cf4

Please sign in to comment.