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

Commit

Permalink
Change Fixed to WeightInfoBounds for Polkadot
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoaguirre committed Apr 13, 2023
1 parent e164da6 commit 0193228
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions runtime/polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use xcm_builder::{
ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter,
FixedWeightBounds, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,
WithComputedOrigin,
WeightInfoBounds, WithComputedOrigin,
};
use xcm_executor::traits::WithOriginFilter;

Expand Down Expand Up @@ -340,7 +340,11 @@ impl xcm_executor::Config for XcmConfig {
type IsTeleporter = TrustedTeleporters;
type UniversalLocation = UniversalLocation;
type Barrier = Barrier;
type Weigher = FixedWeightBounds<BaseXcmWeight, RuntimeCall, MaxInstructions>;
type Weigher = WeightInfoBounds<
crate::weights::xcm::PolkadotXcmWeight<RuntimeCall>,
RuntimeCall,
MaxInstructions,
>;
// The weight trader piggybacks on the existing transaction-fee conversion logic.
type Trader =
UsingComponents<WeightToFee, TokenLocation, AccountId, Balances, ToAuthor<Runtime>>;
Expand Down Expand Up @@ -420,7 +424,11 @@ impl pallet_xcm::Config for Runtime {
type XcmExecutor = xcm_executor::XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything; // == Allow All
type XcmReserveTransferFilter = Everything; // == Allow All
type Weigher = FixedWeightBounds<BaseXcmWeight, RuntimeCall, MaxInstructions>;
type Weigher = WeightInfoBounds<
crate::weights::xcm::PolkadotXcmWeight<RuntimeCall>,
RuntimeCall,
MaxInstructions,
>;
type UniversalLocation = UniversalLocation;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
Expand Down

0 comments on commit 0193228

Please sign in to comment.