Skip to content

Commit

Permalink
always initialize balances cache if necessary in electra upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
realbigsean committed Apr 25, 2024
1 parent 605726c commit 5abe624
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions consensus/state_processing/src/upgrade/electra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ pub fn upgrade_to_electra<E: EthSpec>(
.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)?;

Expand Down

0 comments on commit 5abe624

Please sign in to comment.