From 0351ea55cb378946980d850bae0a95f2810b4a1a Mon Sep 17 00:00:00 2001 From: Dino Pacandi Date: Thu, 8 Aug 2024 14:13:52 +0200 Subject: [PATCH] Comments --- tests/xcm-simulator/src/mocks/parachain.rs | 19 ++---------------- .../src/tests/fungible_assets.rs | 20 +++++++++---------- 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/tests/xcm-simulator/src/mocks/parachain.rs b/tests/xcm-simulator/src/mocks/parachain.rs index c9fc6882b..9346305cc 100644 --- a/tests/xcm-simulator/src/mocks/parachain.rs +++ b/tests/xcm-simulator/src/mocks/parachain.rs @@ -23,8 +23,8 @@ use frame_support::{ dispatch::DispatchClass, parameter_types, traits::{ - AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU32, ConstU64, Contains, Currency, - Everything, Imbalance, InstanceFilter, Nothing, OnUnbalanced, + AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU32, ConstU64, Contains, Everything, + InstanceFilter, Nothing, }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, WEIGHT_REF_TIME_PER_SECOND}, @@ -74,8 +74,6 @@ pub type AccountId = AccountId32; pub type Balance = u128; pub type AssetId = u128; -pub type NegativeImbalance = >::NegativeImbalance; - pub type ShidenAssetLocationIdConverter = AssetLocationIdConverter; parameter_types! { @@ -280,19 +278,6 @@ impl pallet_contracts::Config for Runtime { type ApiVersion = (); } -pub struct BurnFees; -impl OnUnbalanced for BurnFees { - /// Payout tips but burn all the fees - fn on_unbalanceds(mut fees_then_tips: impl Iterator) { - if let Some(mut fees_to_burn) = fees_then_tips.next() { - if let Some(tips) = fees_then_tips.next() { - fees_to_burn.subsume(tips) - } - drop(fees_to_burn); - } - } -} - /// The type used to represent the kinds of proxying allowed. #[derive( Copy, diff --git a/tests/xcm-simulator/src/tests/fungible_assets.rs b/tests/xcm-simulator/src/tests/fungible_assets.rs index a980ee24a..cacf80280 100644 --- a/tests/xcm-simulator/src/tests/fungible_assets.rs +++ b/tests/xcm-simulator/src/tests/fungible_assets.rs @@ -60,7 +60,7 @@ fn para_to_para_reserve_transfer_and_back_via_xtokens() { parachain::RuntimeOrigin::signed(ALICE), Box::new((Here, withdraw_amount).into()), Box::new(destination.into()), - WeightLimit::Unlimited + Unlimited )); // Parachain 2 sovereign account should have it's balance increased, while Alice balance should be decreased. @@ -105,7 +105,7 @@ fn para_to_para_reserve_transfer_and_back_via_xtokens() { parachain::RuntimeOrigin::signed(ALICE), Box::new((para_a_multiloc, remaining).into()), Box::new(destination.into()), - WeightLimit::Unlimited + Unlimited )); }); @@ -446,7 +446,7 @@ fn receive_relay_asset_from_relay_and_send_them_back_via_xtokens() { Box::new(alice.into()), Box::new((Here, withdraw_amount).into()), 0, - WeightLimit::Unlimited, + Unlimited, )); // Parachain A sovereign account should have it's balance increased, while Alice balance should be decreased. @@ -493,7 +493,7 @@ fn receive_relay_asset_from_relay_and_send_them_back_via_xtokens() { parachain::RuntimeOrigin::signed(ALICE), Box::new((Parent, para_a_alice_expected_balance).into()), Box::new(destination.into()), - WeightLimit::Unlimited, + Unlimited, )); }); @@ -545,7 +545,7 @@ fn receive_relay_asset_from_relay_and_send_them_back() { Box::new(alice.into()), Box::new((Here, withdraw_amount).into()), 0, - WeightLimit::Unlimited, + Unlimited, )); // Parachain A sovereign account should have it's balance increased, while Alice balance should be decreased. @@ -655,7 +655,7 @@ fn para_a_send_relay_asset_to_para_b() { Box::new(alice.into_location().into_versioned()), Box::new((Here, withdraw_amount).into()), 0, - WeightLimit::Unlimited, + Unlimited, )); }); @@ -757,7 +757,7 @@ fn send_relay_asset_to_para_b_with_extra_native() { Box::new(alice.into_location().into_versioned()), Box::new((Here, withdraw_amount).into()), 0, - WeightLimit::Unlimited, + Unlimited, )); }); @@ -845,7 +845,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { ), Box::new((Here, withdraw_amount).into()), 0, - WeightLimit::Unlimited, + Unlimited, )); }); @@ -880,7 +880,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { ), Box::new((Here, withdraw_amount).into()), 0, - WeightLimit::Unlimited, + Unlimited, )); }); @@ -932,7 +932,7 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass ), Box::new((Here, withdraw_amount).into()), 0, - WeightLimit::Unlimited, + Unlimited, )); });