5

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?

1
  • What is the problem? The warning is always there. Does the CLI error out or what is the full output and exit code? Commented May 22, 2023 at 12:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.