mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-10 01:47:58 +00:00
Hide benchmarks behind a feature flag (#5024)
* Hide benchmarks behind a feature flag * Propage attributes in impl_runtime_apis macro * Bump impl_version * Fillter cfg attributes * Hide more things under the feature * Fix set_block_number availability * Rename filter_attrs -> filter_cfg_attrs * Rename runtime_benchmarks to runtime-benchmarks
This commit is contained in:
committed by
GitHub
parent
8bf855b09d
commit
ff2a36d7cb
@@ -15,7 +15,7 @@ enumflags2 = { version = "0.6.2" }
|
||||
sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" }
|
||||
sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" }
|
||||
sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" }
|
||||
frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../benchmarking" }
|
||||
frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../benchmarking", optional = true }
|
||||
frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" }
|
||||
frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" }
|
||||
|
||||
@@ -35,3 +35,4 @@ std = [
|
||||
"frame-support/std",
|
||||
"frame-system/std",
|
||||
]
|
||||
runtime-benchmarks = ["frame-benchmarking"]
|
||||
|
||||
@@ -78,6 +78,7 @@ use frame_support::{
|
||||
};
|
||||
use frame_system::{self as system, ensure_signed, ensure_root};
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub mod benchmarking;
|
||||
|
||||
type BalanceOf<T> = <<T as Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;
|
||||
|
||||
Reference in New Issue
Block a user