Skip to content

Commit

Permalink
Merge pull request #552 from ethereum/epoch-in-generate-seed
Browse files Browse the repository at this point in the history
epoch in `generate_seed`
  • Loading branch information
djrtwo committed Feb 3, 2019
2 parents 7298990 + 8d82ee8 commit f80a345
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions specs/core/0_beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,6 @@ def get_shuffling(seed: Bytes32,
committees_per_epoch = get_epoch_committee_count(len(active_validator_indices))

# Shuffle
seed = xor(seed, int_to_bytes32(epoch))
shuffled_active_validator_indices = shuffle(active_validator_indices, seed)

# Split the shuffled list into committees_per_epoch pieces
Expand Down Expand Up @@ -945,7 +944,8 @@ def generate_seed(state: BeaconState,
"""
return hash(
get_randao_mix(state, epoch - SEED_LOOKAHEAD) +
get_active_index_root(state, epoch)
get_active_index_root(state, epoch) +
int_to_bytes32(epoch)
)
```

Expand Down

0 comments on commit f80a345

Please sign in to comment.