I am using the pallet_xcm_benchmarks
, in the config for pallet_xcm_benchmarks::generic
,
I have used
impl pallet_xcm_benchmarks::generic::Config for Runtime {
fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> {
Err(BenchmarkError::Skip)
}
}
this should have skipped the benchmark
exchange_asset {
let (give, want) = T::worst_case_asset_exchange().map_err(|_| BenchmarkError::Skip)?;
let assets = give.clone();
let mut executor = new_executor::<T>(Default::default());
executor.set_holding(give.into());
let instruction = Instruction::ExchangeAsset {
give: assets.into(),
want: want.clone(),
maximal: true,
};
let xcm = Xcm(vec![instruction]);
}: {
executor.bench_process(xcm)?;
} verify {
assert_eq!(executor.holding(), &want.into());
}
when I run the benchmark, it shows
023-05-16 09:32:01 WARNING: benchmark error skipped - exchange_asset Error: Input("Benchmark pallet_xcm_benchmarks::generic::exchange_asset failed: Benchmark not found for this pallet.")
The same config is used in kusama How to fix this problem?