Skip to content

Commit

Permalink
Sort attester slashing indices to avoid arbitrary ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed May 27, 2019
1 parent dd09172 commit a82a6f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion specs/core/0_beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -1707,7 +1707,7 @@ def process_attester_slashing(state: BeaconState, attester_slashing: AttesterSla
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
Expand Down

0 comments on commit a82a6f9

Please sign in to comment.