mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Migrate to Weight::from_parts (#2245)
* Migrate to from_parts Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix remaining files Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * cargo update -p polkadot-primitives Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * cargo update -p sp-io Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use Master Cargo.lock Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * cargo update -p polkadot-primitives Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * cargo update -p sp-io Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
cf3ddb831c
commit
70a0864e4c
@@ -64,7 +64,7 @@ fn test_asset_xcm_trader() {
|
||||
RuntimeHelper::<Runtime>::run_to_block(2, Some(AccountId::from(ALICE)));
|
||||
|
||||
// We are going to buy 4e9 weight
|
||||
let bought = Weight::from_ref_time(4_000_000_000u64);
|
||||
let bought = Weight::from_parts(4_000_000_000u64, 0);
|
||||
|
||||
// Lets calculate amount needed
|
||||
let asset_amount_needed =
|
||||
@@ -143,7 +143,7 @@ fn test_asset_xcm_trader_with_refund() {
|
||||
RuntimeHelper::<Runtime>::run_to_block(2, Some(AccountId::from(ALICE)));
|
||||
|
||||
// We are going to buy 4e9 weight
|
||||
let bought = Weight::from_ref_time(4_000_000_000u64);
|
||||
let bought = Weight::from_parts(4_000_000_000u64, 0);
|
||||
let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap();
|
||||
|
||||
// lets calculate amount needed
|
||||
@@ -212,7 +212,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() {
|
||||
RuntimeHelper::<Runtime>::run_to_block(2, Some(AccountId::from(ALICE)));
|
||||
|
||||
// We are going to buy 5e9 weight
|
||||
let bought = Weight::from_ref_time(500_000_000u64);
|
||||
let bought = Weight::from_parts(500_000_000u64, 0);
|
||||
|
||||
let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap();
|
||||
|
||||
@@ -262,7 +262,7 @@ fn test_that_buying_ed_refund_does_not_refund() {
|
||||
// Set Alice as block author, who will receive fees
|
||||
RuntimeHelper::<Runtime>::run_to_block(2, Some(AccountId::from(ALICE)));
|
||||
|
||||
let bought = Weight::from_ref_time(500_000_000u64);
|
||||
let bought = Weight::from_parts(500_000_000u64, 0);
|
||||
|
||||
let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap();
|
||||
|
||||
@@ -334,7 +334,7 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() {
|
||||
RuntimeHelper::<Runtime>::run_to_block(2, Some(AccountId::from(ALICE)));
|
||||
|
||||
// We are going to buy 4e9 weight
|
||||
let bought = Weight::from_ref_time(4_000_000_000u64);
|
||||
let bought = Weight::from_parts(4_000_000_000u64, 0);
|
||||
|
||||
// lets calculate amount needed
|
||||
let asset_amount_needed = WeightToFee::weight_to_fee(&bought);
|
||||
|
||||
Reference in New Issue
Block a user