Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Create thread_local in XCM executor to limit recursion depth #6304

Merged
merged 14 commits into from
Dec 1, 2022
Prev Previous commit
Next Next commit
Change ThisNetwork to AnyNetwork
  • Loading branch information
KiChjang committed Dec 1, 2022
commit ee0b2ac5213ccdbc41e63a07d5bba7502a8800b4
6 changes: 3 additions & 3 deletions runtime/test-runtime/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use xcm_executor::{

parameter_types! {
pub const BaseXcmWeight: xcm::latest::Weight = Weight::from_parts(1_000, 1_000);
pub const ThisNetwork: NetworkId = NetworkId::Polkadot;
pub const AnyNetwork: Option<NetworkId> = None;
pub const MaxInstructions: u32 = 100;
pub const MaxAssetsIntoHolding: u32 = 16;
pub const UniversalLocation: xcm::latest::InteriorMultiLocation = xcm::latest::Junctions::Here;
Expand All @@ -41,7 +41,7 @@ parameter_types! {
/// of this chain.
pub type LocalOriginToLocation = (
// And a usual Signed origin to be used in XCM as a corresponding AccountId32
SignedToAccountId32<crate::RuntimeOrigin, crate::AccountId, ThisNetwork>,
SignedToAccountId32<crate::RuntimeOrigin, crate::AccountId, AnyNetwork>,
);

pub struct DoNothingRouter;
Expand Down Expand Up @@ -86,7 +86,7 @@ impl WeightTrader for DummyWeightTrader {

type OriginConverter = (
pallet_xcm::XcmPassthrough<super::RuntimeOrigin>,
SignedAccountId32AsNative<ThisNetwork, super::RuntimeOrigin>,
SignedAccountId32AsNative<AnyNetwork, super::RuntimeOrigin>,
);

pub struct XcmConfig;
Expand Down