From b1b2337ec3f22703498954635462bfecf9490811 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Fri, 13 Jul 2018 15:34:46 +1000 Subject: [PATCH] Update assert msg --- src/state/state_transition.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/state/state_transition.rs b/src/state/state_transition.rs index baf70c8e3..77472de32 100644 --- a/src/state/state_transition.rs +++ b/src/state/state_transition.rs @@ -42,6 +42,8 @@ pub fn get_attesters_and_proposer( let proposer_count: usize = 1; let ideal_validator_count: usize = (config.attester_count as usize) + (*skip_count as usize) + proposer_count; + assert!(ideal_validator_count >= 2, + "ideal_validator_count must be >=2"); if ideal_validator_count > active_validator_count { return ( shuffled_validator_indicies[0..active_validator_count - 1].to_vec(),