mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 03:27: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
@@ -36,6 +36,7 @@ std = [
|
||||
"sp-runtime/std",
|
||||
"sp-version/std",
|
||||
]
|
||||
runtime-benchmarks = []
|
||||
|
||||
[[bench]]
|
||||
name = "bench"
|
||||
|
||||
@@ -885,7 +885,7 @@ impl<T: Trait> Module<T> {
|
||||
|
||||
/// Set the block number to something in particular. Can be used as an alternative to
|
||||
/// `initialize` for tests that don't need to bother with the other environment entries.
|
||||
#[cfg(any(feature = "std", test))]
|
||||
#[cfg(any(feature = "std", feature = "runtime-benchmarks", test))]
|
||||
pub fn set_block_number(n: T::BlockNumber) {
|
||||
<Number<T>>::put(n);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user