From 9e156f88f4dd7b240cf31efd9ca42cf3794ae9e0 Mon Sep 17 00:00:00 2001 From: Brooks Date: Wed, 6 Sep 2023 12:00:18 -0400 Subject: [PATCH] Removes invariant `is_serialized_with_abs` param (#33154) --- runtime/src/accounts_background_service.rs | 8 ++++---- runtime/src/bank/tests.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/src/accounts_background_service.rs b/runtime/src/accounts_background_service.rs index 2b6b9fef2bb6f2..dc635f7e67c8fe 100644 --- a/runtime/src/accounts_background_service.rs +++ b/runtime/src/accounts_background_service.rs @@ -501,7 +501,7 @@ pub struct PrunedBanksRequestHandler { } impl PrunedBanksRequestHandler { - pub fn handle_request(&self, bank: &Bank, is_serialized_with_abs: bool) -> usize { + pub fn handle_request(&self, bank: &Bank) -> usize { let mut banks_to_purge: Vec<_> = self.pruned_banks_receiver.try_iter().collect(); // We need a stable sort to ensure we purge banks—with the same slot—in the same order // they were sent into the channel. @@ -530,7 +530,7 @@ impl PrunedBanksRequestHandler { accounts_db.thread_pool_clean.install(|| { grouped_banks_to_purge.into_par_iter().for_each(|group| { group.iter().for_each(|(slot, bank_id)| { - accounts_db.purge_slot(*slot, *bank_id, is_serialized_with_abs); + accounts_db.purge_slot(*slot, *bank_id, true); }) }); }); @@ -545,7 +545,7 @@ impl PrunedBanksRequestHandler { total_remove_slots_time: &mut u64, ) { let mut remove_slots_time = Measure::start("remove_slots_time"); - *removed_slots_count += self.handle_request(bank, true); + *removed_slots_count += self.handle_request(bank); remove_slots_time.stop(); *total_remove_slots_time += remove_slots_time.as_us(); @@ -1166,7 +1166,7 @@ mod test { drop(fork2_bank1); drop(fork0_bank1); drop(fork0_bank0); - let num_banks_purged = pruned_banks_request_handler.handle_request(&fork0_bank3, true); + let num_banks_purged = pruned_banks_request_handler.handle_request(&fork0_bank3); assert_eq!(num_banks_purged, 7); } diff --git a/runtime/src/bank/tests.rs b/runtime/src/bank/tests.rs index c7bc57b60c7a01..b0f758a25f82c1 100644 --- a/runtime/src/bank/tests.rs +++ b/runtime/src/bank/tests.rs @@ -8562,7 +8562,7 @@ fn test_store_scan_consistency_unrooted() { current_major_fork_bank.clean_accounts_for_tests(); // Move purge here so that Bank::drop()->purge_slots() doesn't race // with clean. Simulates the call from AccountsBackgroundService - pruned_banks_request_handler.handle_request(¤t_major_fork_bank, true); + pruned_banks_request_handler.handle_request(¤t_major_fork_bank); } }, Some(Box::new(SendDroppedBankCallback::new(pruned_banks_sender))),