mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 22:41:02 +00:00
Enable async backing on asset-hub-rococo (#2826)
The goal is to move all system chains on Rococo (+ other testnets?) to use async backing. Starting with `asset-hub-rococo` to get feedback, before I do the rest. ## Related Example: https://github.com/paritytech/polkadot-sdk/pull/1619/ Guide: https://github.com/w3f/polkadot-wiki/blob/master/docs/maintain/maintain-guides-async-backing.md --------- Co-authored-by: Branislav Kontur <bkontur@gmail.com> Co-authored-by: Dónal Murray <donal.murray@parity.io>
This commit is contained in:
@@ -31,7 +31,7 @@ use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use parachains_common::{AccountId, Balance};
|
||||
use parachains_runtimes_test_utils::{
|
||||
assert_metadata, assert_total, mock_open_hrmp_channel, AccountIdOf, BalanceOf,
|
||||
CollatorSessionKeys, ExtBuilder, ValidatorIdOf, XcmReceivedFrom,
|
||||
CollatorSessionKeys, ExtBuilder, SlotDurations, ValidatorIdOf, XcmReceivedFrom,
|
||||
};
|
||||
use sp_runtime::{
|
||||
traits::{MaybeEquivalence, StaticLookup, Zero},
|
||||
@@ -57,6 +57,7 @@ pub fn teleports_for_native_asset_works<
|
||||
HrmpChannelOpener,
|
||||
>(
|
||||
collator_session_keys: CollatorSessionKeys<Runtime>,
|
||||
slot_durations: SlotDurations,
|
||||
existential_deposit: BalanceOf<Runtime>,
|
||||
target_account: AccountIdOf<Runtime>,
|
||||
unwrap_pallet_xcm_event: Box<dyn Fn(Vec<u8>) -> Option<pallet_xcm::Event<Runtime>>>,
|
||||
@@ -205,6 +206,7 @@ pub fn teleports_for_native_asset_works<
|
||||
None,
|
||||
included_head.clone(),
|
||||
&alice,
|
||||
&slot_durations,
|
||||
));
|
||||
|
||||
// check balances
|
||||
@@ -257,6 +259,7 @@ pub fn teleports_for_native_asset_works<
|
||||
Some((runtime_para_id, other_para_id)),
|
||||
included_head,
|
||||
&alice,
|
||||
&slot_durations,
|
||||
),
|
||||
Err(DispatchError::Module(sp_runtime::ModuleError {
|
||||
index: 31,
|
||||
@@ -288,6 +291,7 @@ macro_rules! include_teleports_for_native_asset_works(
|
||||
$weight_to_fee:path,
|
||||
$hrmp_channel_opener:path,
|
||||
$collator_session_key:expr,
|
||||
$slot_durations:expr,
|
||||
$existential_deposit:expr,
|
||||
$unwrap_pallet_xcm_event:expr,
|
||||
$runtime_para_id:expr
|
||||
@@ -306,6 +310,7 @@ macro_rules! include_teleports_for_native_asset_works(
|
||||
$hrmp_channel_opener
|
||||
>(
|
||||
$collator_session_key,
|
||||
$slot_durations,
|
||||
$existential_deposit,
|
||||
target_account,
|
||||
$unwrap_pallet_xcm_event,
|
||||
@@ -328,6 +333,7 @@ pub fn teleports_for_foreign_assets_works<
|
||||
ForeignAssetsPalletInstance,
|
||||
>(
|
||||
collator_session_keys: CollatorSessionKeys<Runtime>,
|
||||
slot_durations: SlotDurations,
|
||||
target_account: AccountIdOf<Runtime>,
|
||||
existential_deposit: BalanceOf<Runtime>,
|
||||
asset_owner: AccountIdOf<Runtime>,
|
||||
@@ -592,6 +598,7 @@ pub fn teleports_for_foreign_assets_works<
|
||||
Some((runtime_para_id, foreign_para_id)),
|
||||
included_head,
|
||||
&alice,
|
||||
&slot_durations,
|
||||
));
|
||||
|
||||
// check balances
|
||||
@@ -644,6 +651,7 @@ macro_rules! include_teleports_for_foreign_assets_works(
|
||||
$sovereign_account_of:path,
|
||||
$assets_pallet_instance:path,
|
||||
$collator_session_key:expr,
|
||||
$slot_durations:expr,
|
||||
$existential_deposit:expr,
|
||||
$unwrap_pallet_xcm_event:expr,
|
||||
$unwrap_xcmp_queue_event:expr
|
||||
@@ -666,6 +674,7 @@ macro_rules! include_teleports_for_foreign_assets_works(
|
||||
$assets_pallet_instance
|
||||
>(
|
||||
$collator_session_key,
|
||||
$slot_durations,
|
||||
target_account,
|
||||
$existential_deposit,
|
||||
asset_owner,
|
||||
@@ -1397,6 +1406,7 @@ pub fn reserve_transfer_native_asset_to_non_teleport_para_works<
|
||||
LocationToAccountId,
|
||||
>(
|
||||
collator_session_keys: CollatorSessionKeys<Runtime>,
|
||||
slot_durations: SlotDurations,
|
||||
existential_deposit: BalanceOf<Runtime>,
|
||||
alice_account: AccountIdOf<Runtime>,
|
||||
unwrap_pallet_xcm_event: Box<dyn Fn(Vec<u8>) -> Option<pallet_xcm::Event<Runtime>>>,
|
||||
@@ -1470,6 +1480,7 @@ pub fn reserve_transfer_native_asset_to_non_teleport_para_works<
|
||||
other_para_id.into(),
|
||||
included_head,
|
||||
&alice,
|
||||
&slot_durations,
|
||||
);
|
||||
|
||||
// we calculate exact delivery fees _after_ sending the message by weighing the sent
|
||||
|
||||
@@ -27,7 +27,7 @@ use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use parachains_common::{AccountId, Balance};
|
||||
use parachains_runtimes_test_utils::{
|
||||
mock_open_hrmp_channel, AccountIdOf, BalanceOf, CollatorSessionKeys, ExtBuilder, RuntimeHelper,
|
||||
ValidatorIdOf, XcmReceivedFrom,
|
||||
SlotDurations, ValidatorIdOf, XcmReceivedFrom,
|
||||
};
|
||||
use sp_runtime::{traits::StaticLookup, Saturating};
|
||||
use sp_std::ops::Mul;
|
||||
@@ -52,6 +52,7 @@ pub fn limited_reserve_transfer_assets_for_native_asset_works<
|
||||
LocationToAccountId,
|
||||
>(
|
||||
collator_session_keys: CollatorSessionKeys<Runtime>,
|
||||
slot_durations: SlotDurations,
|
||||
existential_deposit: BalanceOf<Runtime>,
|
||||
alice_account: AccountIdOf<Runtime>,
|
||||
unwrap_pallet_xcm_event: Box<dyn Fn(Vec<u8>) -> Option<pallet_xcm::Event<Runtime>>>,
|
||||
@@ -125,6 +126,7 @@ pub fn limited_reserve_transfer_assets_for_native_asset_works<
|
||||
local_bridge_hub_para_id.into(),
|
||||
included_head,
|
||||
&alice,
|
||||
&slot_durations,
|
||||
);
|
||||
|
||||
// we calculate exact delivery fees _after_ sending the message by weighing the sent
|
||||
|
||||
Reference in New Issue
Block a user