diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/electra/forktransition/ElectraStateUpgrade.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/electra/forktransition/ElectraStateUpgrade.java index 6cd637e4b49..a2b6795a290 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/electra/forktransition/ElectraStateUpgrade.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/electra/forktransition/ElectraStateUpgrade.java @@ -103,7 +103,9 @@ public BeaconStateElectra upgrade(final BeaconState preState) { .boxed() .sorted( Comparator.comparing( - index -> validators.get(index).getActivationEligibilityEpoch())) + (Integer index) -> + validators.get(index).getActivationEligibilityEpoch()) + .thenComparing(index -> index)) .forEach( index -> beaconStateMutators.queueEntireBalanceAndResetValidator(state, index));