From c4d2c9554071189b05841ec92fd46614e0e8c534 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" Date: Mon, 18 Jul 2022 12:44:33 -0500 Subject: [PATCH] move hash stat to correct level for ahv to work (#26649) --- runtime/src/accounts_db.rs | 3 ++- runtime/src/active_stats.rs | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 33dcd39472..0dc6ced681 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -6598,7 +6598,6 @@ impl AccountsDb { slot: Slot, config: &CalcAccountsHashConfig<'_>, ) -> Result<(Hash, u64), BankHashVerificationError> { - let _guard = self.active_stats.activate(ActiveStatItem::Hash); if !use_index { let mut collect_time = Measure::start("collect"); let (combined_maps, slots) = self.get_snapshot_storages(slot, None, config.ancestors); @@ -6797,6 +6796,8 @@ impl AccountsDb { storages: &SortedStorages<'_>, mut stats: HashStats, ) -> Result<(Hash, u64), BankHashVerificationError> { + let _guard = self.active_stats.activate(ActiveStatItem::Hash); + self.mark_old_slots_as_dirty(storages, Some(config.epoch_schedule.slots_per_epoch)); let (num_hash_scan_passes, bins_per_pass) = Self::bins_per_pass(self.num_hash_scan_passes); diff --git a/runtime/src/active_stats.rs b/runtime/src/active_stats.rs index 132b45ea68..5df48d5ef8 100644 --- a/runtime/src/active_stats.rs +++ b/runtime/src/active_stats.rs @@ -15,7 +15,6 @@ pub struct ActiveStats { pub enum ActiveStatItem { Clean, Shrink, - #[allow(dead_code)] SquashAncient, Hash, Flush,