Skip to content

Commit 979e43a

Browse files
committed
Tweak logs
1 parent 663dfd3 commit 979e43a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

beacon_node/store/src/hot_cold_store.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3138,7 +3138,6 @@ pub fn migrate_database<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>>(
31383138
// stored (see `STATE_UPPER_LIMIT_NO_RETAIN`). Make an exception for the genesis state
31393139
// which always needs to be copied from the hot DB to the freezer and should not be deleted.
31403140
if slot != 0 && slot < anchor_info.state_upper_limit {
3141-
debug!(store.log, "Pruning finalized state"; "slot" => slot);
31423141
continue;
31433142
}
31443143

@@ -3147,11 +3146,15 @@ pub fn migrate_database<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>>(
31473146
// Only store the cold state if it's on a diff boundary.
31483147
// Calling `store_cold_state_summary` instead of `store_cold_state` for those allows us
31493148
// to skip loading many hot states.
3150-
if matches!(
3151-
store.hierarchy.storage_strategy(slot)?,
3152-
StorageStrategy::ReplayFrom(..)
3153-
) {
3149+
if let StorageStrategy::ReplayFrom(from) = store.hierarchy.storage_strategy(slot)? {
31543150
// Store slot -> state_root and state_root -> slot mappings.
3151+
debug!(
3152+
store.log,
3153+
"Storing cold state";
3154+
"strategy" => "replay",
3155+
"from_slot" => from,
3156+
"slot" => slot,
3157+
);
31553158
store.store_cold_state_summary(&state_root, slot, &mut cold_db_ops)?;
31563159
} else {
31573160
let state: BeaconState<E> = store

0 commit comments

Comments
 (0)