From 23d15f51a799fa9fc3c2a7aa5493b05fcad81568 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 14 Mar 2019 18:57:17 +0000 Subject: [PATCH] Update 0_beacon-chain.md --- specs/core/0_beacon-chain.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 5ca59c66b..d0be14e47 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1014,14 +1014,14 @@ def get_beacon_proposer_index(state: BeaconState, assert previous_epoch <= epoch <= next_epoch - first_committee, _ = get_crosslink_committees_at_slot(state, slot, registry_change)[0] i = 0 - while i < len(first_committee): + first_committee, _ = get_crosslink_committees_at_slot(state, slot, registry_change)[0] + 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)] if get_effective_balance(state, candidate) * 256 > MAX_DEPOSIT_AMOUNT * rand_byte: return candidate i += 1 - return first_committee[epoch % len(first_committee)] ``` ### `verify_merkle_branch`