Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletions xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ use codec::Encode;
use frame_benchmarking::{benchmarks, BenchmarkError};
use frame_support::dispatch::GetDispatchInfo;
use sp_std::vec;
use xcm::{
latest::{prelude::*, MultiAssets},
DoubleEncoded,
};
use xcm::{latest::prelude::*, DoubleEncoded};

benchmarks! {
query_holding {
Expand Down Expand Up @@ -70,26 +67,6 @@ benchmarks! {

}

// Worst case scenario for this benchmark is a large number of assets to
// filter through the reserve.
reserve_asset_deposited {
const MAX_ASSETS: u32 = 100; // TODO when executor has a built in limit, use it here. #4426
let mut executor = new_executor::<T>(Default::default());
let assets = (0..MAX_ASSETS).map(|i| MultiAsset {
id: Abstract(i.encode()),
fun: Fungible(i as u128),

}).collect::<vec::Vec<_>>();
let multiassets: MultiAssets = assets.into();

let instruction = Instruction::ReserveAssetDeposited(multiassets.clone());
let xcm = Xcm(vec![instruction]);
}: {
executor.execute(xcm).map_err(|_| BenchmarkError::Skip)?;
} verify {
assert_eq!(executor.holding, multiassets.into());
}

query_response {
let mut executor = new_executor::<T>(Default::default());
let (query_id, response) = T::worst_case_response();
Expand Down