Update 0_beacon-chain.md

Assuming `epoch % i` is a bug, and you meant `epoch + i`. @vbuterin
This commit is contained in:
Justin 2019-03-14 19:01:32 +00:00 committed by GitHub
parent 23d15f51a7
commit bbc5139115
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1018,7 +1018,7 @@ def get_beacon_proposer_index(state: BeaconState,
i = 0
while True:
rand_byte = hash(generate_seed(get_current_epoch(state)) + int_to_bytes8(i // 32))[i % 32]
candidate = first_committee[(epoch % i) % len(first_committee)]
candidate = first_committee[(epoch + i) % len(first_committee)]
if get_effective_balance(state, candidate) * 256 > MAX_DEPOSIT_AMOUNT * rand_byte:
return candidate
i += 1