XCM ExportMessage benchmark support (#6923)

* XCM ExportMessage benchmark support

* include inner-xcm in ExportMessage benchmark

---------

Signed-off-by: acatangiu <adrian@parity.io>
This commit is contained in:
Adrian Catangiu
2023-03-23 12:30:25 +02:00
committed by GitHub
parent f989b2bb1a
commit b51cb8927c
11 changed files with 64 additions and 8 deletions
+8 -2
View File
@@ -1756,8 +1756,8 @@ sp_api::impl_runtime_apis! {
impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {}
use xcm::latest::{
AssetId::*, Fungibility::*, Junction, Junctions::*, MultiAsset, MultiAssets,
MultiLocation, Response,
AssetId::*, Fungibility::*, InteriorMultiLocation, Junction, Junctions::*,
MultiAsset, MultiAssets, MultiLocation, NetworkId, Response,
};
use xcm_config::{Westmint, TokenLocation};
@@ -1833,6 +1833,12 @@ sp_api::impl_runtime_apis! {
// Westend doesn't support asset locking
Err(BenchmarkError::Skip)
}
fn export_message_origin_and_destination(
) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> {
// Westend doesn't support exporting messages
Err(BenchmarkError::Skip)
}
}
type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
@@ -246,7 +246,7 @@ impl<RuntimeCall> XcmWeightInfo<RuntimeCall> for WestendXcmWeight<RuntimeCall> {
Weight::MAX
}
fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight {
// Westend does not currently support export message operations
// Westend relay should not support export message operations
Weight::MAX
}
fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight {