From b3c72bc8a2a306e40770da7eefb7b167378d380f Mon Sep 17 00:00:00 2001 From: Brooks Prumo Date: Fri, 19 Aug 2022 12:09:47 -0400 Subject: [PATCH] Call `AccountsDb::shrink_all_slots()` directly (#27235) --- runtime/src/bank.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 1728a2bbfea247..7cc04184ce02be 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -7162,7 +7162,10 @@ impl Bank { let mut shrink_all_slots_time = Measure::start("shrink_all_slots"); if !accounts_db_skip_shrink && self.slot() > 0 { info!("shrinking.."); - self.shrink_all_slots(true, Some(last_full_snapshot_slot)); + self.rc + .accounts + .accounts_db + .shrink_all_slots(true, Some(last_full_snapshot_slot)); } shrink_all_slots_time.stop(); @@ -7458,13 +7461,6 @@ impl Bank { ); } - pub fn shrink_all_slots(&self, is_startup: bool, last_full_snapshot_slot: Option) { - self.rc - .accounts - .accounts_db - .shrink_all_slots(is_startup, last_full_snapshot_slot); - } - pub fn print_accounts_stats(&self) { self.rc.accounts.accounts_db.print_accounts_stats(""); }