From 4a8798814e7dbff4a1b2175e86f10aa8c06e17fc Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Tue, 22 Oct 2024 14:10:34 -0500 Subject: [PATCH] Add explicit tie-breaker in pending balance deposits sort --- .../versions/electra/forktransition/ElectraStateUpgrade.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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));