diff --git a/accounts-db/src/accounts_db.rs b/accounts-db/src/accounts_db.rs index ce8ffb5c83c90c..852c9a012e8a73 100644 --- a/accounts-db/src/accounts_db.rs +++ b/accounts-db/src/accounts_db.rs @@ -7205,6 +7205,15 @@ impl AccountsDb { ); let splitter = SplitAncientStorages::new(oldest_non_ancient_slot, snapshot_storages); + let slots_per_epoch = config + .rent_collector + .epoch_schedule + .get_slots_in_epoch(config.rent_collector.epoch); + let one_epoch_old = snapshot_storages + .range() + .end + .saturating_sub(slots_per_epoch); + stats.scan_chunks = splitter.chunk_count; (0..splitter.chunk_count) .into_par_iter() @@ -7213,15 +7222,6 @@ impl AccountsDb { let range_this_chunk = splitter.get_slot_range(chunk)?; - let slots_per_epoch = config - .rent_collector - .epoch_schedule - .get_slots_in_epoch(config.rent_collector.epoch); - let one_epoch_old = snapshot_storages - .range() - .end - .saturating_sub(slots_per_epoch); - let file_name = { let mut load_from_cache = true; let mut hasher = hash_map::DefaultHasher::new();