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

Co #11976: Enable rust features #5983

Merged
merged 7 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
9 changes: 9 additions & 0 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,15 @@ pub fn run() -> Result<()> {
let chain_spec = &runner.config().chain_spec;

match cmd {
#[cfg(not(feature = "runtime-benchmarks"))]
BenchmarkCmd::Storage(_) =>
return Err(sc_cli::Error::Input(
"Compile with --features=runtime-benchmarks \
to enable storage benchmarks."
.into(),
)
.into()),
#[cfg(feature = "runtime-benchmarks")]
BenchmarkCmd::Storage(cmd) => runner.sync_run(|mut config| {
let (client, backend, _, _) = service::new_chain_ops(&mut config, None)?;
let db = backend.expose_db();
Expand Down
4 changes: 3 additions & 1 deletion node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ runtime-benchmarks = [
"polkadot-runtime?/runtime-benchmarks",
"kusama-runtime?/runtime-benchmarks",
"westend-runtime?/runtime-benchmarks",
"rococo-runtime?/runtime-benchmarks"
"rococo-runtime?/runtime-benchmarks",

"service/runtime-benchmarks",
]
try-runtime = [
"polkadot-runtime?/try-runtime",
Expand Down
8 changes: 4 additions & 4 deletions runtime/kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ runtime-benchmarks = [
"pallet-membership/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-nomination-pools/runtime-benchmarks",
"pallet-nomination-pools-benchmarking",
"pallet-nomination-pools-benchmarking/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
Expand All @@ -226,10 +226,10 @@ runtime-benchmarks = [
"pallet-treasury/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-offences-benchmarking",
"pallet-session-benchmarking",
"pallet-offences-benchmarking/runtime-benchmarks",
"pallet-session-benchmarking/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"frame-system-benchmarking",
"frame-system-benchmarking/runtime-benchmarks",
"hex-literal",
"xcm-builder/runtime-benchmarks",
"frame-election-provider-support/runtime-benchmarks",
Expand Down
8 changes: 4 additions & 4 deletions runtime/polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ runtime-benchmarks = [
"pallet-membership/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-nomination-pools/runtime-benchmarks",
"pallet-nomination-pools-benchmarking",
"pallet-nomination-pools-benchmarking/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
Expand All @@ -214,9 +214,9 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"pallet-offences-benchmarking",
"pallet-session-benchmarking",
"frame-system-benchmarking",
"pallet-offences-benchmarking/runtime-benchmarks",
"pallet-session-benchmarking/runtime-benchmarks",
"frame-system-benchmarking/runtime-benchmarks",
"hex-literal",
"xcm-builder/runtime-benchmarks",
"frame-election-provider-support/runtime-benchmarks",
Expand Down
8 changes: 4 additions & 4 deletions runtime/westend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ runtime-benchmarks = [
"pallet-im-online/runtime-benchmarks",
"pallet-indices/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-nomination-pools-benchmarking",
"pallet-nomination-pools-benchmarking/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-recovery/runtime-benchmarks",
Expand All @@ -212,10 +212,10 @@ runtime-benchmarks = [
"pallet-treasury/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-offences-benchmarking",
"pallet-session-benchmarking",
"pallet-offences-benchmarking/runtime-benchmarks",
"pallet-session-benchmarking/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"frame-system-benchmarking",
"frame-system-benchmarking/runtime-benchmarks",
"hex-literal",
"xcm-builder/runtime-benchmarks",
"pallet-xcm-benchmarks",
Expand Down