implement GenesisConfig for pallet-xcm (#4125)

* implement GenesisConfig for pallet-xcm

* Apply review suggestions
This commit is contained in:
zjb0807
2021-10-28 17:16:45 +08:00
committed by GitHub
parent 5f5358279f
commit c3d6ebe61a
+7 -1
View File
@@ -126,7 +126,7 @@ construct_runtime!(
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
ParasOrigin: origin::{Pallet, Origin},
XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin},
XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config},
TestNotifier: pallet_test_notifier::{Pallet, Call, Event<T>},
}
);
@@ -324,6 +324,12 @@ pub(crate) fn new_test_ext_with_balances(
.assimilate_storage(&mut t)
.unwrap();
<pallet_xcm::GenesisConfig as frame_support::traits::GenesisBuild<Test>>::assimilate_storage(
&pallet_xcm::GenesisConfig { safe_xcm_version: Some(2) },
&mut t,
)
.unwrap();
let mut ext = sp_io::TestExternalities::new(t);
ext.execute_with(|| System::set_block_number(1));
ext