Update 0_beacon-chain.md

This commit is contained in:
Justin 2019-05-01 09:34:09 +01:00 committed by GitHub
parent 407902763c
commit f62126d5ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -933,7 +933,7 @@ def get_beacon_proposer_index(state: BeaconState) -> ValidatorIndex:
i = 0
while True:
candidate_index = first_committee[(current_epoch + i) % len(first_committee)]
random_byte = hash(seed + int_to_bytes8(i // 32))[i % 32])
random_byte = hash(seed + int_to_bytes8(i // 32))[i % 32]
effective_balance = state.validator_registry[candidate_index].effective_balance
if effective_balance * MAX_RANDOM_BYTE >= MAX_EFFECTIVE_BALANCE * random_byte:
return candidate_index