From 87da125b7829f494a99771edd1eba92be1661e93 Mon Sep 17 00:00:00 2001 From: Cheng JIANG Date: Thu, 21 Oct 2021 11:13:43 +0800 Subject: [PATCH 1/5] export xcm_pallet config Signed-off-by: Cheng JIANG --- node/service/src/chain_spec.rs | 6 ++++++ runtime/kusama/src/lib.rs | 6 ++---- runtime/rococo/src/lib.rs | 2 +- runtime/westend/src/lib.rs | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index 502c9dbf7217..2d3b3e461035 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -558,6 +558,7 @@ fn westend_staging_testnet_config_genesis(wasm_binary: &[u8]) -> westend::Genesi registrar: westend_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, + xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, } } @@ -755,6 +756,7 @@ fn kusama_staging_testnet_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisC }, gilt: Default::default(), paras: Default::default(), + xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, } } @@ -1054,6 +1056,7 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime:: registrar: rococo_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, + xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, // bridge_rococo_grandpa: rococo_runtime::BridgeRococoGrandpaConfig { // owner: Some(endowed_accounts[0].clone()), // ..Default::default() @@ -1411,6 +1414,7 @@ pub fn kusama_testnet_genesis( }, gilt: Default::default(), paras: Default::default(), + xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, } } @@ -1492,6 +1496,7 @@ pub fn westend_testnet_genesis( registrar: westend_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, + xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, } } @@ -1568,6 +1573,7 @@ pub fn rococo_testnet_genesis( registrar: rococo_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, + xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, // bridge_rococo_grandpa: rococo_runtime::BridgeRococoGrandpaConfig { // owner: Some(root_key.clone()), // ..Default::default() diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index c0aa9ce9c9d1..3c6c6b56b028 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -49,9 +49,7 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; use beefy_primitives::crypto::AuthorityId as BeefyId; use frame_support::{ construct_runtime, parameter_types, - traits::{ - Contains, Everything, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, Nothing, - }, + traits::{Contains, Everything, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, Nothing}, weights::Weight, PalletId, RuntimeDebug, }; @@ -1523,7 +1521,7 @@ construct_runtime! { Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 73, // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin} = 99, + XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, } } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index d0a0c4dbda73..1dd8cc57dd0b 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -255,7 +255,7 @@ construct_runtime! { Multisig: pallet_multisig::{Pallet, Call, Storage, Event}, // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin} = 99, + XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, } } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index c19d16030539..e4c1d5e15efe 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1101,7 +1101,7 @@ construct_runtime! { Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 64, // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin} = 99, + XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, } } From 398d125c39207fb20e152479f36d71601ee241a7 Mon Sep 17 00:00:00 2001 From: Cheng JIANG Date: Thu, 21 Oct 2021 11:16:55 +0800 Subject: [PATCH 2/5] run format Signed-off-by: Cheng JIANG --- node/service/src/chain_spec.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index 2d3b3e461035..61eda5c09fe2 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -558,7 +558,7 @@ fn westend_staging_testnet_config_genesis(wasm_binary: &[u8]) -> westend::Genesi registrar: westend_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, + xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, } } @@ -756,7 +756,7 @@ fn kusama_staging_testnet_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisC }, gilt: Default::default(), paras: Default::default(), - xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, + xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, } } @@ -1056,7 +1056,7 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime:: registrar: rococo_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, + xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, // bridge_rococo_grandpa: rococo_runtime::BridgeRococoGrandpaConfig { // owner: Some(endowed_accounts[0].clone()), // ..Default::default() From dd0974156beccbab1727ddbca5b4c18da6562ea3 Mon Sep 17 00:00:00 2001 From: Cheng JIANG Date: Thu, 21 Oct 2021 11:30:22 +0800 Subject: [PATCH 3/5] fix typo Signed-off-by: Cheng JIANG --- node/service/src/chain_spec.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index 61eda5c09fe2..84c6e767f0ea 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -558,7 +558,7 @@ fn westend_staging_testnet_config_genesis(wasm_binary: &[u8]) -> westend::Genesi registrar: westend_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, + xcm_pallet: westend_runtime::XcmPalletConfig { safe_xcm_version: Some(2) }, } } @@ -1056,7 +1056,7 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime:: registrar: rococo_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, + xcm_pallet: rococo_runtime::XcmPalletConfig { safe_xcm_version: Some(2) }, // bridge_rococo_grandpa: rococo_runtime::BridgeRococoGrandpaConfig { // owner: Some(endowed_accounts[0].clone()), // ..Default::default() @@ -1496,7 +1496,7 @@ pub fn westend_testnet_genesis( registrar: westend_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, + xcm_pallet: westend_runtime::XcmPalletConfig { safe_xcm_version: Some(2) }, } } @@ -1573,7 +1573,7 @@ pub fn rococo_testnet_genesis( registrar: rococo_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, + xcm_pallet: rococo_runtime::XcmPalletConfig { safe_xcm_version: Some(2) }, // bridge_rococo_grandpa: rococo_runtime::BridgeRococoGrandpaConfig { // owner: Some(root_key.clone()), // ..Default::default() From 4405ea9fab24307318ffc20a833010fe864b3be3 Mon Sep 17 00:00:00 2001 From: Cheng JIANG Date: Thu, 21 Oct 2021 14:42:19 +0800 Subject: [PATCH 4/5] add generic parameter to support different runtimes --- node/service/src/chain_spec.rs | 24 ++++++++++++++++++------ runtime/kusama/src/lib.rs | 2 +- runtime/rococo/src/lib.rs | 2 +- runtime/westend/src/lib.rs | 2 +- xcm/pallet-xcm/src/lib.rs | 9 +++++---- xcm/pallet-xcm/src/mock.rs | 4 ++++ 6 files changed, 30 insertions(+), 13 deletions(-) diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index 84c6e767f0ea..6c1d9d38322b 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -558,7 +558,10 @@ fn westend_staging_testnet_config_genesis(wasm_binary: &[u8]) -> westend::Genesi registrar: westend_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: westend_runtime::XcmPalletConfig { safe_xcm_version: Some(2) }, + xcm_pallet: westend_runtime::XcmPalletConfig { + safe_xcm_version: Some(2), + ..Default::default() + }, } } @@ -756,7 +759,7 @@ fn kusama_staging_testnet_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisC }, gilt: Default::default(), paras: Default::default(), - xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, + xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2), ..Default::default() }, } } @@ -1056,7 +1059,10 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime:: registrar: rococo_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: rococo_runtime::XcmPalletConfig { safe_xcm_version: Some(2) }, + xcm_pallet: rococo_runtime::XcmPalletConfig { + safe_xcm_version: Some(2), + ..Default::default() + }, // bridge_rococo_grandpa: rococo_runtime::BridgeRococoGrandpaConfig { // owner: Some(endowed_accounts[0].clone()), // ..Default::default() @@ -1414,7 +1420,7 @@ pub fn kusama_testnet_genesis( }, gilt: Default::default(), paras: Default::default(), - xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, + xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2), ..Default::default() }, } } @@ -1496,7 +1502,10 @@ pub fn westend_testnet_genesis( registrar: westend_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: westend_runtime::XcmPalletConfig { safe_xcm_version: Some(2) }, + xcm_pallet: westend_runtime::XcmPalletConfig { + safe_xcm_version: Some(2), + ..Default::default() + }, } } @@ -1573,7 +1582,10 @@ pub fn rococo_testnet_genesis( registrar: rococo_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: rococo_runtime::XcmPalletConfig { safe_xcm_version: Some(2) }, + xcm_pallet: rococo_runtime::XcmPalletConfig { + safe_xcm_version: Some(2), + ..Default::default() + }, // bridge_rococo_grandpa: rococo_runtime::BridgeRococoGrandpaConfig { // owner: Some(root_key.clone()), // ..Default::default() diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 3c6c6b56b028..811bcad283a4 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1521,7 +1521,7 @@ construct_runtime! { Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 73, // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, + XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, } } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 1dd8cc57dd0b..1cfb202129e4 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -255,7 +255,7 @@ construct_runtime! { Multisig: pallet_multisig::{Pallet, Call, Storage, Event}, // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, + XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, } } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index e4c1d5e15efe..9be334111d07 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1101,7 +1101,7 @@ construct_runtime! { Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 64, // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, + XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, } } diff --git a/xcm/pallet-xcm/src/lib.rs b/xcm/pallet-xcm/src/lib.rs index 6456f9ee36b9..643eee610e63 100644 --- a/xcm/pallet-xcm/src/lib.rs +++ b/xcm/pallet-xcm/src/lib.rs @@ -388,20 +388,21 @@ pub mod pallet { StorageValue<_, VersionMigrationStage, OptionQuery>; #[pallet::genesis_config] - pub struct GenesisConfig { + pub struct GenesisConfig { /// The default version to encode outgoing XCM messages with. pub safe_xcm_version: Option, + pub phantom: sp_std::marker::PhantomData, } #[cfg(feature = "std")] - impl Default for GenesisConfig { + impl Default for GenesisConfig { fn default() -> Self { - Self { safe_xcm_version: Some(XCM_VERSION) } + Self { safe_xcm_version: Some(XCM_VERSION), phantom: Default::default() } } } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl GenesisBuild for GenesisConfig { fn build(&self) { SafeXcmVersion::::set(self.safe_xcm_version); } diff --git a/xcm/pallet-xcm/src/mock.rs b/xcm/pallet-xcm/src/mock.rs index 8b6174c5b722..b8edfcf4f046 100644 --- a/xcm/pallet-xcm/src/mock.rs +++ b/xcm/pallet-xcm/src/mock.rs @@ -324,6 +324,10 @@ pub(crate) fn new_test_ext_with_balances( .assimilate_storage(&mut t) .unwrap(); + pallet_xcm::GenesisConfig:: { safe_xcm_version: Some(2), ..Default::default() } + .assimilate_storage(&mut t) + .unwrap(); + let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| System::set_block_number(1)); ext From 0c01dda34571ca7b5708077d42a256f67771b312 Mon Sep 17 00:00:00 2001 From: Cheng JIANG Date: Fri, 22 Oct 2021 09:35:43 +0800 Subject: [PATCH 5/5] Revert "add generic parameter to support different runtimes" This reverts commit 4405ea9fab24307318ffc20a833010fe864b3be3. --- node/service/src/chain_spec.rs | 24 ++++++------------------ runtime/kusama/src/lib.rs | 2 +- runtime/rococo/src/lib.rs | 2 +- runtime/westend/src/lib.rs | 2 +- xcm/pallet-xcm/src/lib.rs | 9 ++++----- xcm/pallet-xcm/src/mock.rs | 4 ---- 6 files changed, 13 insertions(+), 30 deletions(-) diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index 6c1d9d38322b..84c6e767f0ea 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -558,10 +558,7 @@ fn westend_staging_testnet_config_genesis(wasm_binary: &[u8]) -> westend::Genesi registrar: westend_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: westend_runtime::XcmPalletConfig { - safe_xcm_version: Some(2), - ..Default::default() - }, + xcm_pallet: westend_runtime::XcmPalletConfig { safe_xcm_version: Some(2) }, } } @@ -759,7 +756,7 @@ fn kusama_staging_testnet_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisC }, gilt: Default::default(), paras: Default::default(), - xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2), ..Default::default() }, + xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, } } @@ -1059,10 +1056,7 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime:: registrar: rococo_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: rococo_runtime::XcmPalletConfig { - safe_xcm_version: Some(2), - ..Default::default() - }, + xcm_pallet: rococo_runtime::XcmPalletConfig { safe_xcm_version: Some(2) }, // bridge_rococo_grandpa: rococo_runtime::BridgeRococoGrandpaConfig { // owner: Some(endowed_accounts[0].clone()), // ..Default::default() @@ -1420,7 +1414,7 @@ pub fn kusama_testnet_genesis( }, gilt: Default::default(), paras: Default::default(), - xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2), ..Default::default() }, + xcm_pallet: kusama::XcmPalletConfig { safe_xcm_version: Some(2) }, } } @@ -1502,10 +1496,7 @@ pub fn westend_testnet_genesis( registrar: westend_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: westend_runtime::XcmPalletConfig { - safe_xcm_version: Some(2), - ..Default::default() - }, + xcm_pallet: westend_runtime::XcmPalletConfig { safe_xcm_version: Some(2) }, } } @@ -1582,10 +1573,7 @@ pub fn rococo_testnet_genesis( registrar: rococo_runtime::RegistrarConfig { next_free_para_id: polkadot_primitives::v1::LOWEST_PUBLIC_ID, }, - xcm_pallet: rococo_runtime::XcmPalletConfig { - safe_xcm_version: Some(2), - ..Default::default() - }, + xcm_pallet: rococo_runtime::XcmPalletConfig { safe_xcm_version: Some(2) }, // bridge_rococo_grandpa: rococo_runtime::BridgeRococoGrandpaConfig { // owner: Some(root_key.clone()), // ..Default::default() diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 811bcad283a4..3c6c6b56b028 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1521,7 +1521,7 @@ construct_runtime! { Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 73, // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, + XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, } } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 1cfb202129e4..1dd8cc57dd0b 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -255,7 +255,7 @@ construct_runtime! { Multisig: pallet_multisig::{Pallet, Call, Storage, Event}, // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, + XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, } } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 9be334111d07..e4c1d5e15efe 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1101,7 +1101,7 @@ construct_runtime! { Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 64, // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, + XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, } } diff --git a/xcm/pallet-xcm/src/lib.rs b/xcm/pallet-xcm/src/lib.rs index 643eee610e63..6456f9ee36b9 100644 --- a/xcm/pallet-xcm/src/lib.rs +++ b/xcm/pallet-xcm/src/lib.rs @@ -388,21 +388,20 @@ pub mod pallet { StorageValue<_, VersionMigrationStage, OptionQuery>; #[pallet::genesis_config] - pub struct GenesisConfig { + pub struct GenesisConfig { /// The default version to encode outgoing XCM messages with. pub safe_xcm_version: Option, - pub phantom: sp_std::marker::PhantomData, } #[cfg(feature = "std")] - impl Default for GenesisConfig { + impl Default for GenesisConfig { fn default() -> Self { - Self { safe_xcm_version: Some(XCM_VERSION), phantom: Default::default() } + Self { safe_xcm_version: Some(XCM_VERSION) } } } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl GenesisBuild for GenesisConfig { fn build(&self) { SafeXcmVersion::::set(self.safe_xcm_version); } diff --git a/xcm/pallet-xcm/src/mock.rs b/xcm/pallet-xcm/src/mock.rs index b8edfcf4f046..8b6174c5b722 100644 --- a/xcm/pallet-xcm/src/mock.rs +++ b/xcm/pallet-xcm/src/mock.rs @@ -324,10 +324,6 @@ pub(crate) fn new_test_ext_with_balances( .assimilate_storage(&mut t) .unwrap(); - pallet_xcm::GenesisConfig:: { safe_xcm_version: Some(2), ..Default::default() } - .assimilate_storage(&mut t) - .unwrap(); - let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| System::set_block_number(1)); ext