enforce order of attester slashing indicies. replicates #1126

This commit is contained in:
Danny Ryan 2019-05-31 13:49:15 -06:00
parent 5a64b4a909
commit a0fd345a77
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 1 additions and 1 deletions

View File

@ -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