From 7f8b64d98fdeaf26f81ef6711348d8c9d31bd683 Mon Sep 17 00:00:00 2001 From: Brooks Prumo Date: Thu, 18 Aug 2022 10:25:53 -0400 Subject: [PATCH] Call `AccountsDb::shrink_all_slots()` directly --- 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 8557b70bd06d30..0b87c1a2357232 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(""); }