Ensure genesis inducts all validators as active
This commit is contained in:
parent
896810fb9f
commit
58c6465f44
@ -2,6 +2,7 @@ use types::{
|
|||||||
CrosslinkRecord,
|
CrosslinkRecord,
|
||||||
Hash256,
|
Hash256,
|
||||||
ValidatorRegistration,
|
ValidatorRegistration,
|
||||||
|
ValidatorStatus,
|
||||||
};
|
};
|
||||||
use super::{
|
use super::{
|
||||||
ActiveState,
|
ActiveState,
|
||||||
@ -37,7 +38,7 @@ pub fn genesis_states(config: &ChainConfig)
|
|||||||
let validators = {
|
let validators = {
|
||||||
let mut inductor = ValidatorInductor::new(0, config.shard_count, vec![]);
|
let mut inductor = ValidatorInductor::new(0, config.shard_count, vec![]);
|
||||||
for registration in &config.initial_validators {
|
for registration in &config.initial_validators {
|
||||||
let _ = inductor.induct(®istration);
|
let _ = inductor.induct(®istration, ValidatorStatus::Active);
|
||||||
};
|
};
|
||||||
inductor.to_vec()
|
inductor.to_vec()
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user