Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit ab4ae6b

Browse files
node-template: frame_system::code removed
1 parent 12dac2c commit ab4ae6b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

bin/node-template/node/src/chain_spec.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ pub fn authority_keys_from_seed(s: &str) -> (AuraId, GrandpaId) {
3838

3939
pub fn development_config() -> Result<ChainSpec, String> {
4040
let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?;
41-
4241
Ok(ChainSpec::from_genesis(
4342
// Name
4443
"Development",
@@ -47,7 +46,6 @@ pub fn development_config() -> Result<ChainSpec, String> {
4746
ChainType::Development,
4847
move || {
4948
testnet_genesis(
50-
wasm_binary,
5149
// Initial PoA authorities
5250
vec![authority_keys_from_seed("Alice")],
5351
// Sudo account
@@ -73,12 +71,12 @@ pub fn development_config() -> Result<ChainSpec, String> {
7371
None,
7472
// Extensions
7573
None,
74+
wasm_binary,
7675
))
7776
}
7877

7978
pub fn local_testnet_config() -> Result<ChainSpec, String> {
8079
let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?;
81-
8280
Ok(ChainSpec::from_genesis(
8381
// Name
8482
"Local Testnet",
@@ -87,7 +85,6 @@ pub fn local_testnet_config() -> Result<ChainSpec, String> {
8785
ChainType::Local,
8886
move || {
8987
testnet_genesis(
90-
wasm_binary,
9188
// Initial PoA authorities
9289
vec![authority_keys_from_seed("Alice"), authority_keys_from_seed("Bob")],
9390
// Sudo account
@@ -121,12 +118,12 @@ pub fn local_testnet_config() -> Result<ChainSpec, String> {
121118
None,
122119
// Extensions
123120
None,
121+
wasm_binary,
124122
))
125123
}
126124

127125
/// Configure initial storage state for FRAME modules.
128126
fn testnet_genesis(
129-
wasm_binary: &[u8],
130127
initial_authorities: Vec<(AuraId, GrandpaId)>,
131128
root_key: AccountId,
132129
endowed_accounts: Vec<AccountId>,
@@ -135,7 +132,6 @@ fn testnet_genesis(
135132
RuntimeGenesisConfig {
136133
system: SystemConfig {
137134
// Add Wasm runtime to storage.
138-
code: wasm_binary.to_vec(),
139135
..Default::default()
140136
},
141137
balances: BalancesConfig {

0 commit comments

Comments
 (0)