diff --git a/beacon-chain/core/electra/upgrade.go b/beacon-chain/core/electra/upgrade.go index 2364db01f43..5eaff157a7f 100644 --- a/beacon-chain/core/electra/upgrade.go +++ b/beacon-chain/core/electra/upgrade.go @@ -187,7 +187,7 @@ func UpgradeToElectra(beaconState state.BeaconState) (state.BeaconState, error) } // [New in Electra:EIP7251] - earliestExitEpoch := time.CurrentEpoch(beaconState) + earliestExitEpoch := helpers.ActivationExitEpoch(time.CurrentEpoch(beaconState)) preActivationIndices := make([]primitives.ValidatorIndex, 0) compoundWithdrawalIndices := make([]primitives.ValidatorIndex, 0) if err = beaconState.ReadFromEveryValidator(func(index int, val state.ReadOnlyValidator) error { diff --git a/beacon-chain/core/electra/upgrade_test.go b/beacon-chain/core/electra/upgrade_test.go index 40f2f754c5a..c80aef5f185 100644 --- a/beacon-chain/core/electra/upgrade_test.go +++ b/beacon-chain/core/electra/upgrade_test.go @@ -159,7 +159,7 @@ func TestUpgradeToElectra(t *testing.T) { eee, err := mSt.EarliestExitEpoch() require.NoError(t, err) - require.Equal(t, primitives.Epoch(1), eee) + require.Equal(t, helpers.ActivationExitEpoch(primitives.Epoch(1)), eee) cbtc, err := mSt.ConsolidationBalanceToConsume() require.NoError(t, err)