add sanity check for SIGFPE crashes (#524)

This commit is contained in:
Dustin Brody 2019-11-06 15:50:12 +00:00 committed by GitHub
parent 0073555752
commit a1f5f3512b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,6 +190,9 @@ func get_beacon_proposer_index*(state: BeaconState, stateCache: var StateCache):
first_committee = get_crosslink_committee(state, epoch, shard, stateCache)
seed = get_seed(state, epoch)
# This mainly fails when there are no active validators for some reason
doAssert first_committee.len > 0
var
i = 0
buffer: array[(32+8), byte]