Skip to content

Commit

Permalink
Call AccountsDb::shrink_all_slots() directly
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo committed Aug 18, 2022
1 parent 3fc4ba7 commit 5411034
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 @@ -7136,7 +7136,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, last_full_snapshot_slot);
self.rc
.accounts
.accounts_db
.shrink_all_slots(true, last_full_snapshot_slot);
}
shrink_all_slots_time.stop();

Expand Down Expand Up @@ -7432,13 +7435,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 5411034

Please sign in to comment.