From 0fd1b21757cb3095fb3d15a47a0ef0f239a491eb Mon Sep 17 00:00:00 2001 From: Marko Petrlic Date: Wed, 11 Oct 2023 10:28:40 +0200 Subject: [PATCH] Fixed dev chain spec --- node/src/chains/common.rs | 5 ++++- node/src/chains/definitions.rs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/node/src/chains/common.rs b/node/src/chains/common.rs index 23a6c2b33..5d256b31e 100644 --- a/node/src/chains/common.rs +++ b/node/src/chains/common.rs @@ -94,13 +94,14 @@ pub fn runtime_genesis_config( .iter() .map(|k| { ( - k.controller.clone(), k.stash.clone(), + k.controller.clone(), STASH_BOND, StakerStatus::Validator, ) }) .collect(); + let validator_count = session_keys.len() as u32; let session_keys = session_keys.into_iter().map(|k| k.into()).collect(); let (code, kc_public_params, block_length) = standard_system_configuration(); @@ -119,6 +120,8 @@ pub fn runtime_genesis_config( balances: BalancesConfig { balances }, staking: StakingConfig { stakers, + validator_count, + minimum_validator_count: 1, ..Default::default() }, session: SessionConfig { keys: session_keys }, diff --git a/node/src/chains/definitions.rs b/node/src/chains/definitions.rs index c4f914d48..6e8077b39 100644 --- a/node/src/chains/definitions.rs +++ b/node/src/chains/definitions.rs @@ -87,7 +87,7 @@ impl AuthorityKeys { impl From for (AccountId, AccountId, SessionKeys) { fn from(val: AuthorityKeys) -> (AccountId, AccountId, SessionKeys) { - (val.controller, val.stash, val.session_keys) + (val.stash.clone(), val.stash, val.session_keys) } }