Rename seed to epoch_seed as per Danny

This commit is contained in:
Justin 2019-09-23 20:58:29 +01:00 committed by GitHub
parent e7db58cb7e
commit 25efbe7458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -270,8 +270,8 @@ def get_shard_block_proposer_index(state: BeaconState,
return None
MAX_RANDOM_BYTE = 2**8 - 1
seed = get_seed(state, current_epoch, DOMAIN_SHARD_PROPOSER)
seed = hash(seed + int_to_bytes(shard, length=8) + int_to_bytes(slot, length=8))
epoch_seed = get_seed(state, current_epoch, DOMAIN_SHARD_PROPOSER)
seed = hash(epoch_seed + int_to_bytes(shard, length=8) + int_to_bytes(slot, length=8))
i = 0
while True:
candidate_index = active_indices[(slot + i) % len(active_indices)]