Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

fix: runtime benchmark feature #6690

Merged
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions runtime/test-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,5 @@ std = [

runtime-benchmarks = [
"pallet-xcm/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
]
2 changes: 2 additions & 0 deletions xcm/pallet-xcm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ std = [
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
]
try-runtime = ["frame-support/try-runtime"]
4 changes: 2 additions & 2 deletions xcm/xcm-simulator/example/src/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ impl EnsureOriginWithArg<RuntimeOrigin, MultiLocation> for ForeignCreators {
}

#[cfg(feature = "runtime-benchmarks")]
fn successful_origin(a: &MultiLocation) -> RuntimeOrigin {
pallet_xcm::Origin::Xcm(a.clone()).into()
fn try_successful_origin(a: &MultiLocation) -> Result<RuntimeOrigin, ()> {
Ok(pallet_xcm::Origin::Xcm(a.clone()).into())
}
}

Expand Down
2 changes: 2 additions & 0 deletions xcm/xcm-simulator/fuzzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ polkadot-parachain = { path = "../../../parachain" }
[features]
runtime-benchmarks = [
"pallet-xcm/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"frame-support/runtime-benchmarks",
]

[[bin]]
Expand Down