Merge pull request #821 from ethereum/fix-mod

fix shuffling shard mod bug
This commit is contained in:
Danny Ryan 2019-03-21 10:23:18 -06:00 committed by GitHub
commit 729757d427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2134,8 +2134,8 @@ def update_registry_and_shuffling_data(state: BeaconState) -> None:
state.current_shuffling_epoch = next_epoch
state.current_shuffling_start_shard = (
state.current_shuffling_start_shard +
get_current_epoch_committee_count(state) % SHARD_COUNT
)
get_current_epoch_committee_count(state)
) % SHARD_COUNT
state.current_shuffling_seed = generate_seed(state, state.current_shuffling_epoch)
else:
# If processing at least one crosslink keeps failing, then reshuffle every power of two,