Properly migrate weights to v2 (#6091)

* Create migration for config pallet

* Use XcmWeight in XCM pallet extrinsics

* Link to PR in doc comment

* cargo fmt

* Fix tests

* Fix tests

* Remove unused import

* Update runtime/parachains/src/configuration/migration.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add missing on_runtime_upgrade implementation

* Use new migration API

* cargo fmt

* Fix log message

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Keith Yeung
2022-10-05 17:47:15 +08:00
committed by GitHub
parent b13e07bc47
commit 42c043d7f4
9 changed files with 338 additions and 16 deletions
+4 -4
View File
@@ -517,7 +517,7 @@ fn execute_withdraw_to_deposit_works() {
buy_execution((Here, SEND_AMOUNT)),
DepositAsset { assets: All.into(), max_assets: 1, beneficiary: dest },
]))),
Weight::from_ref_time(weight)
weight
));
assert_eq!(Balances::total_balance(&ALICE), INITIAL_BALANCE - SEND_AMOUNT);
assert_eq!(Balances::total_balance(&BOB), SEND_AMOUNT);
@@ -549,7 +549,7 @@ fn trapped_assets_can_be_claimed() {
// This would succeed, but we never get to it.
DepositAsset { assets: All.into(), max_assets: 1, beneficiary: dest.clone() },
]))),
Weight::from_ref_time(weight)
weight
));
let source: MultiLocation =
Junction::AccountId32 { network: NetworkId::Any, id: ALICE.into() }.into();
@@ -579,7 +579,7 @@ fn trapped_assets_can_be_claimed() {
buy_execution((Here, SEND_AMOUNT)),
DepositAsset { assets: All.into(), max_assets: 1, beneficiary: dest.clone() },
]))),
Weight::from_ref_time(weight)
weight
));
assert_eq!(Balances::total_balance(&ALICE), INITIAL_BALANCE - SEND_AMOUNT);
@@ -594,7 +594,7 @@ fn trapped_assets_can_be_claimed() {
buy_execution((Here, SEND_AMOUNT)),
DepositAsset { assets: All.into(), max_assets: 1, beneficiary: dest },
]))),
Weight::from_ref_time(weight)
weight
));
assert_eq!(
last_event(),