From 31abd31d8a119e08d4c20a19d5a0e04a03624a07 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Thu, 7 Feb 2019 16:58:39 +0100 Subject: [PATCH] Fix an int conversion issue --- beacon_chain/spec/validator.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beacon_chain/spec/validator.nim b/beacon_chain/spec/validator.nim index 755c05881..bc699101f 100644 --- a/beacon_chain/spec/validator.nim +++ b/beacon_chain/spec/validator.nim @@ -128,4 +128,5 @@ func get_beacon_proposer_index*(state: BeaconState, slot: uint64): ValidatorInde # because presently, `state.slot += 1` happens before this function # is called - see also testutil.getNextBeaconProposerIndex let (first_committee, _) = get_crosslink_committees_at_slot(state, slot)[0] - first_committee[slot.int mod len(first_committee)] + let idx = int(slot mod SlotNumber(first_committee.len)) + first_committee[idx]