Call `AccountsDb::shrink_all_slots()` directly (#27235)

This commit is contained in:
Brooks Prumo 2022-08-19 12:09:47 -04:00 committed by GitHub
parent 2184d0ff26
commit b3c72bc8a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 8 deletions

View File

@ -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<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("");
}