Fix an int conversion issue

This commit is contained in:
Zahary Karadjov 2019-02-07 16:58:39 +01:00 committed by zah
parent dfcd22519b
commit 31abd31d8a
1 changed files with 2 additions and 1 deletions

View File

@ -128,4 +128,5 @@ func get_beacon_proposer_index*(state: BeaconState, slot: uint64): ValidatorInde
# because presently, `state.slot += 1` happens before this function # because presently, `state.slot += 1` happens before this function
# is called - see also testutil.getNextBeaconProposerIndex # is called - see also testutil.getNextBeaconProposerIndex
let (first_committee, _) = get_crosslink_committees_at_slot(state, slot)[0] 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]