Skip to content

Commit

Permalink
Fixed dev chain spec
Browse files Browse the repository at this point in the history
  • Loading branch information
markopoloparadox committed Oct 11, 2023
1 parent 0c8db42 commit 0fd1b21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion node/src/chains/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion node/src/chains/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl AuthorityKeys {

impl From<AuthorityKeys> 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)
}
}

Expand Down

0 comments on commit 0fd1b21

Please sign in to comment.