From 431cb897ec7f43dae13786d75cf3070627792785 Mon Sep 17 00:00:00 2001 From: linning Date: Mon, 31 Jul 2023 17:14:11 +0800 Subject: [PATCH] Apply review suggestions Signed-off-by: linning --- crates/subspace-node/src/chain_spec.rs | 2 +- crates/subspace-node/src/domain/evm_chain_spec.rs | 3 ++- test/subspace-test-client/src/chain_spec.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/subspace-node/src/chain_spec.rs b/crates/subspace-node/src/chain_spec.rs index 72c2ae2c67..8042ed94d6 100644 --- a/crates/subspace-node/src/chain_spec.rs +++ b/crates/subspace-node/src/chain_spec.rs @@ -388,7 +388,7 @@ fn subspace_genesis_config( let raw_domain_genesis_config = { let mut domain_genesis_config = evm_chain_spec::get_testnet_genesis_by_spec_id(spec_id); // Clear the WASM code of the genesis config since it is duplicated with `GenesisDomain::code` - domain_genesis_config.system = Default::default(); + domain_genesis_config.system.code = Default::default(); serde_json::to_vec(&domain_genesis_config) .expect("Genesis config serialization never fails; qed") }; diff --git a/crates/subspace-node/src/domain/evm_chain_spec.rs b/crates/subspace-node/src/domain/evm_chain_spec.rs index be0c286a94..e0247711c3 100644 --- a/crates/subspace-node/src/domain/evm_chain_spec.rs +++ b/crates/subspace-node/src/domain/evm_chain_spec.rs @@ -165,9 +165,9 @@ pub enum SpecId { } pub fn get_testnet_genesis_by_spec_id(spec_id: SpecId) -> GenesisConfig { - let accounts = get_dev_accounts(); match spec_id { SpecId::Dev => { + let accounts = get_dev_accounts(); testnet_genesis( accounts.clone(), // Alith is Sudo @@ -218,6 +218,7 @@ pub fn get_testnet_genesis_by_spec_id(spec_id: SpecId) -> GenesisConfig { ) } SpecId::Local => { + let accounts = get_dev_accounts(); testnet_genesis( accounts.clone(), // Alith is sudo diff --git a/test/subspace-test-client/src/chain_spec.rs b/test/subspace-test-client/src/chain_spec.rs index e5ab22a650..0bed5402dd 100644 --- a/test/subspace-test-client/src/chain_spec.rs +++ b/test/subspace-test-client/src/chain_spec.rs @@ -80,7 +80,7 @@ fn create_genesis_config( let raw_domain_genesis_config = { let mut domain_genesis_config = testnet_evm_genesis(); // Clear the WASM code of the genesis config since it is duplicated with `GenesisDomain::code` - domain_genesis_config.system = Default::default(); + domain_genesis_config.system.code = Default::default(); serde_json::to_vec(&domain_genesis_config) .expect("Genesis config serialization never fails; qed") };