diff --git a/consensus/state_processing/src/upgrade/electra.rs b/consensus/state_processing/src/upgrade/electra.rs index f988b7abd67..7fe243eee3f 100644 --- a/consensus/state_processing/src/upgrade/electra.rs +++ b/consensus/state_processing/src/upgrade/electra.rs @@ -22,6 +22,9 @@ pub fn upgrade_to_electra( .unwrap_or(epoch) .safe_add(1)?; + // The total active balance cache must be built before the consolidation churn limit + // is calculated. + pre_state.build_total_active_balance_cache(spec)?; let consolidation_balance_to_consume = pre_state.get_consolidation_churn_limit(spec)?; let earliest_consolidation_epoch = spec.compute_activation_exit_epoch(epoch)?;