simplify bank drop calls (#24142)

* simplify bank drop calls

* clippy: import

* Update ledger/src/blockstore_processor.rs

Co-authored-by: Brooks Prumo <brooks@prumo.org>

* Update runtime/src/accounts_background_service.rs

Co-authored-by: Brooks Prumo <brooks@prumo.org>

* Update runtime/src/bank.rs

Co-authored-by: Brooks Prumo <brooks@prumo.org>

* cleanup

* format

* use msb of bank_id to indicates that we are dropping

* clippy

* restore bank id

* clippy

* revert is-serialized_with_abs flag

* assert

* clippy

* whitespace

* fix bank drop callback check

* more fix

* remove msb dropping implementation

* fix

Co-authored-by: Brooks Prumo <brooks@prumo.org>
This commit is contained in:
HaoranYi
2022-04-14 08:43:54 -05:00
committed by GitHub
parent 57ff7371b4
commit e3ef0741be
5 changed files with 26 additions and 26 deletions

View File

@@ -1296,12 +1296,11 @@ fn load_frozen_forks(
if last_free.elapsed() > Duration::from_secs(10) {
// Purge account state for all dropped banks
for (pruned_slot, pruned_bank_id) in pruned_banks_receiver.try_iter() {
// Simulate this purge being from the AccountsBackgroundService
let is_from_abs = true;
new_root_bank.rc.accounts.purge_slot(
// Simulate this purge is from AccountBackgroundService
new_root_bank.rc.accounts.accounts_db.purge_slot(
pruned_slot,
pruned_bank_id,
is_from_abs,
true,
);
}