From 794f6aed892ebea9e016c9dda1604ae4ca5b4bf2 Mon Sep 17 00:00:00 2001 From: Dustin Brody Date: Fri, 1 Mar 2019 14:39:17 +0000 Subject: [PATCH] fix https://github.com/status-im/nim-beacon-chain/issues/145 (#147) --- beacon_chain/spec/validator.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_chain/spec/validator.nim b/beacon_chain/spec/validator.nim index f60c9a7d2..63d4cb49d 100644 --- a/beacon_chain/spec/validator.nim +++ b/beacon_chain/spec/validator.nim @@ -98,7 +98,7 @@ func get_shuffling*(seed: Eth2Digest, source_buffer: array[(32+1+4), byte] shuffled_active_validator_indices = mapIt( 0 ..< list_size.int, it.ValidatorIndex) - sources = repeat(Eth2Digest(), max(list_size div 256, 1)) + sources = repeat(Eth2Digest(), (list_size div 256) + 1) ## The pivot's a function of seed and round only. ## This doesn't change across rounds.