Skip to content

Commit

Permalink
Call AccountsDb::shrink_all_slots() directly (#27235)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Aug 19, 2022
1 parent 2184d0f commit b3c72bc
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -7458,13 +7461,6 @@ impl Bank {
);
}

pub fn shrink_all_slots(&self, is_startup: bool, last_full_snapshot_slot: Option<Slot>) {
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("");
}
Expand Down

0 comments on commit b3c72bc

Please sign in to comment.