From 27e2d512d96bba13dc02e41629f7abf385877387 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 43de49847d5d47..b087dcc2774951 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -7177,7 +7177,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(); @@ -7473,13 +7476,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(""); }