diff --git a/bizinikiwi/pezframe/metadata-hash-extension/Cargo.toml b/bizinikiwi/pezframe/metadata-hash-extension/Cargo.toml index a5ea77fc..4157b36f 100644 --- a/bizinikiwi/pezframe/metadata-hash-extension/Cargo.toml +++ b/bizinikiwi/pezframe/metadata-hash-extension/Cargo.toml @@ -66,3 +66,4 @@ serde = [] experimental = [] with-tracing = [] tuples-96 = [] +metadata-hash = ["bizinikiwi-wasm-builder/metadata-hash"] diff --git a/bizinikiwi/pezframe/metadata-hash-extension/src/tests.rs b/bizinikiwi/pezframe/metadata-hash-extension/src/tests.rs index 4b2dbd02..cf9fe7d8 100644 --- a/bizinikiwi/pezframe/metadata-hash-extension/src/tests.rs +++ b/bizinikiwi/pezframe/metadata-hash-extension/src/tests.rs @@ -172,6 +172,9 @@ mod docs { type PalletInfo = add_metadata_hash_extension::PalletInfo; } + /// This function demonstrates how to enable metadata hash in WasmBuilder. + /// It is only available when the `metadata-hash` feature is enabled on `bizinikiwi-wasm-builder`. + #[cfg(feature = "metadata-hash")] #[docify::export] fn enable_metadata_hash_in_wasm_builder() { bizinikiwi_wasm_builder::WasmBuilder::init_with_defaults() diff --git a/pezcumulus/pezkuwi-omni-node/lib/Cargo.toml b/pezcumulus/pezkuwi-omni-node/lib/Cargo.toml index c785dead..4c686b7d 100644 --- a/pezcumulus/pezkuwi-omni-node/lib/Cargo.toml +++ b/pezcumulus/pezkuwi-omni-node/lib/Cargo.toml @@ -241,6 +241,7 @@ try-runtime = [ "pezsp-version/try-runtime", "teyrchains-common/try-runtime", ] +storage-benchmark = ["pezframe-benchmarking-cli/storage-benchmark"] std = [ "bizinikiwi-frame-rpc-system/std", "bizinikiwi-state-trie-migration-rpc/std", diff --git a/pezcumulus/pezkuwi-omni-node/lib/src/command.rs b/pezcumulus/pezkuwi-omni-node/lib/src/command.rs index 418e631c..cae52300 100644 --- a/pezcumulus/pezkuwi-omni-node/lib/src/command.rs +++ b/pezcumulus/pezkuwi-omni-node/lib/src/command.rs @@ -252,7 +252,7 @@ where node.run_benchmark_block_cmd(config, cmd) }) }, - #[cfg(feature = "runtime-benchmarks")] + #[cfg(feature = "storage-benchmark")] BenchmarkCmd::Storage(cmd) => { // The command needs the full node configuration because it uses the node // client and the database API, storage and shared_trie_cache. It requires diff --git a/pezcumulus/pezkuwi-omni-node/lib/src/common/command.rs b/pezcumulus/pezkuwi-omni-node/lib/src/common/command.rs index 7df252e0..d2eeb69b 100644 --- a/pezcumulus/pezkuwi-omni-node/lib/src/common/command.rs +++ b/pezcumulus/pezkuwi-omni-node/lib/src/common/command.rs @@ -17,7 +17,7 @@ use crate::common::spec::BaseNodeSpec; use pezcumulus_client_cli::ExportGenesisHeadCommand; use pezframe_benchmarking_cli::BlockCmd; -#[cfg(any(feature = "runtime-benchmarks"))] +#[cfg(feature = "storage-benchmark")] use pezframe_benchmarking_cli::StorageCmd; use pezsc_cli::{CheckBlockCmd, ExportBlocksCmd, ExportStateCmd, ImportBlocksCmd, RevertCmd}; use pezsc_service::{Configuration, TaskManager}; @@ -71,7 +71,7 @@ pub trait NodeCommandRunner { cmd: &BlockCmd, ) -> SyncCmdResult; - #[cfg(any(feature = "runtime-benchmarks"))] + #[cfg(feature = "storage-benchmark")] fn run_benchmark_storage_cmd( self: Box, config: Configuration, @@ -146,7 +146,7 @@ where cmd.run(partial.client) } - #[cfg(any(feature = "runtime-benchmarks"))] + #[cfg(feature = "storage-benchmark")] fn run_benchmark_storage_cmd( self: Box, config: Configuration,