Fix XCM benchmark template (#7320)

* Fix XCM benchmark template

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Keep function pub

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::generic

* ".git/.scripts/commands/bench/bench.sh" xcm westend pallet_xcm_benchmarks::generic

* ".git/.scripts/commands/bench/bench.sh" xcm rococo pallet_xcm_benchmarks::generic

* Fix test

* Actually fix test

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
This commit is contained in:
Oliver Tale-Yazdi
2023-06-02 10:52:06 +02:00
committed by GitHub
parent 2651dce9fd
commit 2d73e39d2f
5 changed files with 826 additions and 285 deletions
+3 -2
View File
@@ -446,8 +446,9 @@ fn karura_liquid_staking_xcm_has_sane_weight_upper_limt() {
let weight = <XcmConfig as xcm_executor::Config>::Weigher::weight(&mut xcm)
.expect("weighing XCM failed");
// Test that the weigher gives us a sensible weight
assert_eq!(weight, Weight::from_parts(20_313_281_000, 65536));
// Test that the weigher gives us a sensible weight but don't exactly hard-code it, otherwise it
// will be out of date after each re-run.
assert!(weight.all_lte(Weight::from_parts(30_313_281_000, 65536)));
let Some(Transact { require_weight_at_most, call, .. }) =
xcm.inner_mut().into_iter().find(|inst| matches!(inst, Transact { .. })) else {