use active index root for generate seed mix in

This commit is contained in:
Danny Ryan 2019-06-28 11:20:24 -06:00
parent 5a8f3e495a
commit b40e2284a0
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 1 additions and 1 deletions

View File

@ -785,7 +785,7 @@ def generate_seed(state: BeaconState,
"""
return hash(
get_randao_mix(state, Epoch(epoch + EPOCHS_PER_HISTORICAL_VECTOR - MIN_SEED_LOOKAHEAD)) +
state.compact_committees_roots[epoch % EPOCHS_PER_HISTORICAL_VECTOR] +
hash_tree_root(List[ValidatorIndex, VALIDATOR_REGISTRY_LIMIT](get_active_validator_indices(state, epoch))) +
int_to_bytes(epoch, length=32)
)
```