Add fix to `get_shuffling`

Ensures it does not try to shuffle out of range of the `active_validator_indices` list.
This commit is contained in:
Paul Hauner 2019-02-16 17:55:27 +11:00 committed by GitHub
parent f932534763
commit b92cd9be03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -807,7 +807,7 @@ def get_shuffling(seed: Bytes32,
# Shuffle
shuffled_active_validator_indices = [
active_validator_indices[get_permuted_index(i, len(active_validator_indices), seed)]
for i in active_validator_indices
for i in range(len(active_validator_indices))
]
# Split the shuffled list into committees_per_epoch pieces