mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 19:01:08 +00:00
Fixes
This commit is contained in:
@@ -438,23 +438,10 @@ mod tests {
|
||||
fn execute(
|
||||
_origin: impl Into<MultiLocation>,
|
||||
_: Weightless,
|
||||
message: &Xcm,
|
||||
_hash: XcmHash,
|
||||
weight_limit: Weight,
|
||||
_weight_limit: Weight,
|
||||
) -> Outcome {
|
||||
let o = match (message.0.len(), &message.0.first()) {
|
||||
(1, Some(Transact { require_weight_at_most, .. })) => {
|
||||
if *require_weight_at_most <= weight_limit {
|
||||
Outcome::Complete(*require_weight_at_most)
|
||||
} else {
|
||||
Outcome::Error(XcmError::WeightLimitReached(*require_weight_at_most))
|
||||
}
|
||||
},
|
||||
// use 1000 to decide that it's not supported.
|
||||
_ => Outcome::Incomplete(1000.min(weight_limit), XcmError::Unimplemented),
|
||||
};
|
||||
TRACE.with(|q| q.borrow_mut().push((message, o.clone())));
|
||||
o
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
fn charge_fees(_location: impl Into<MultiLocation>, _fees: MultiAssets) -> XcmResult {
|
||||
|
||||
@@ -17,7 +17,7 @@ use super::*;
|
||||
use crate as xcmp_queue;
|
||||
use core::marker::PhantomData;
|
||||
use cumulus_primitives_core::{IsSystem, ParaId};
|
||||
use frame_support::{parameter_types, traits::OriginTrait};
|
||||
use frame_support::{parameter_types, traits::{OriginTrait, Nothing}};
|
||||
use frame_system::EnsureRoot;
|
||||
use sp_core::H256;
|
||||
use sp_runtime::{
|
||||
@@ -152,8 +152,13 @@ impl xcm_executor::Config for XcmConfig {
|
||||
type AssetTrap = ();
|
||||
type AssetClaims = ();
|
||||
type SubscriptionService = ();
|
||||
type PalletInstancesInfo = AllPallets;
|
||||
type PalletInstancesInfo = AllPalletsWithSystem;
|
||||
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
|
||||
type AssetLocker = ();
|
||||
type AssetExchanger = ();
|
||||
type FeeManager = ();
|
||||
type MessageExporter = ();
|
||||
type UniversalAliases = Nothing;
|
||||
}
|
||||
|
||||
pub type XcmRouter = (
|
||||
|
||||
@@ -269,9 +269,9 @@ mod tests {
|
||||
.clone()
|
||||
.pushed_with_interior(GeneralIndex(42))
|
||||
.expect("multilocation will only have 2 junctions; qed");
|
||||
let asset = MultiAsset { id: Concrete(asset_location), fun: 1_000_000.into() };
|
||||
let asset = MultiAsset { id: Concrete(asset_location), fun: 1_000_000u128.into() };
|
||||
assert!(
|
||||
AssetsFrom::<SomeSiblingParachain>::filter_asset_location(
|
||||
AssetsFrom::<SomeSiblingParachain>::contains(
|
||||
&asset,
|
||||
&SomeSiblingParachain::get()
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user