Skip to content

Commit

Permalink
Make GenesisConfig type non-optional
Browse files Browse the repository at this point in the history
Related Substrate PR: paritytech/substrate#8275
  • Loading branch information
HCastano committed Apr 6, 2021
1 parent 598e7dc commit 927a405
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
26 changes: 13 additions & 13 deletions bin/millau/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,33 +154,33 @@ fn testnet_genesis(
_enable_println: bool,
) -> GenesisConfig {
GenesisConfig {
frame_system: Some(SystemConfig {
frame_system: SystemConfig {
code: WASM_BINARY.to_vec(),
changes_trie_config: Default::default(),
}),
pallet_balances: Some(BalancesConfig {
},
pallet_balances: BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 50)).collect(),
}),
pallet_aura: Some(AuraConfig {
},
pallet_aura: AuraConfig {
authorities: Vec::new(),
}),
pallet_grandpa: Some(GrandpaConfig {
},
pallet_grandpa: GrandpaConfig {
authorities: Vec::new(),
}),
pallet_sudo: Some(SudoConfig { key: root_key }),
pallet_session: Some(SessionConfig {
},
pallet_sudo: SudoConfig { key: root_key },
pallet_session: SessionConfig {
keys: initial_authorities
.iter()
.map(|x| (x.0.clone(), x.0.clone(), session_keys(x.1.clone(), x.2.clone())))
.collect::<Vec<_>>(),
}),
pallet_bridge_grandpa_Instance1: Some(BridgeWestendGrandpaConfig {
},
pallet_bridge_grandpa_Instance1: BridgeWestendGrandpaConfig {
// for our deployments to avoid multiple same-nonces transactions:
// //Alice is already used to initialize Rialto<->Millau bridge
// => let's use //George to initialize Westend->Millau bridge
owner: Some(get_account_id_from_seed::<sr25519::Public>("George")),
..Default::default()
}),
},
}
}

Expand Down
26 changes: 13 additions & 13 deletions bin/rialto/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,28 +154,28 @@ fn testnet_genesis(
_enable_println: bool,
) -> GenesisConfig {
GenesisConfig {
frame_system: Some(SystemConfig {
frame_system: SystemConfig {
code: WASM_BINARY.to_vec(),
changes_trie_config: Default::default(),
}),
pallet_balances: Some(BalancesConfig {
},
pallet_balances: BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 50)).collect(),
}),
pallet_aura: Some(AuraConfig {
},
pallet_aura: AuraConfig {
authorities: Vec::new(),
}),
pallet_bridge_eth_poa_Instance1: Some(load_rialto_poa_bridge_config()),
pallet_bridge_eth_poa_Instance2: Some(load_kovan_bridge_config()),
pallet_grandpa: Some(GrandpaConfig {
},
pallet_bridge_eth_poa_Instance1: load_rialto_poa_bridge_config(),
pallet_bridge_eth_poa_Instance2: load_kovan_bridge_config(),
pallet_grandpa: GrandpaConfig {
authorities: Vec::new(),
}),
pallet_sudo: Some(SudoConfig { key: root_key }),
pallet_session: Some(SessionConfig {
},
pallet_sudo: SudoConfig { key: root_key },
pallet_session: SessionConfig {
keys: initial_authorities
.iter()
.map(|x| (x.0.clone(), x.0.clone(), session_keys(x.1.clone(), x.2.clone())))
.collect::<Vec<_>>(),
}),
},
}
}

Expand Down

0 comments on commit 927a405

Please sign in to comment.