From a0fd345a77e633da86a7ae99330d8c2cb56efabe Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Fri, 31 May 2019 13:49:15 -0600 Subject: [PATCH] enforce order of attester slashing indicies. replicates #1126 --- specs/core/0_beacon-chain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 46c811fed..1ca1e9d4e 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1681,7 +1681,7 @@ def process_attester_slashing(state: BeaconState, slashed_any = False attesting_indices_1 = attestation_1.custody_bit_0_indices + attestation_1.custody_bit_1_indices attesting_indices_2 = attestation_2.custody_bit_0_indices + attestation_2.custody_bit_1_indices - for index in set(attesting_indices_1).intersection(attesting_indices_2): + for index in sorted(set(attesting_indices_1).intersection(attesting_indices_2)): if is_slashable_validator(state.validator_registry[index], get_current_epoch(state)): slash_validator(state, index) slashed_any = True