Ensure genesis inducts all validators as active

This commit is contained in:
Paul Hauner 2018-10-24 10:15:59 +02:00
parent 896810fb9f
commit 58c6465f44
No known key found for this signature in database
GPG Key ID: 303E4494BB28068C

View File

@ -2,6 +2,7 @@ use types::{
CrosslinkRecord,
Hash256,
ValidatorRegistration,
ValidatorStatus,
};
use super::{
ActiveState,
@ -37,7 +38,7 @@ pub fn genesis_states(config: &ChainConfig)
let validators = {
let mut inductor = ValidatorInductor::new(0, config.shard_count, vec![]);
for registration in &config.initial_validators {
let _ = inductor.induct(&registration);
let _ = inductor.induct(&registration, ValidatorStatus::Active);
};
inductor.to_vec()
};