Skip to content

Commit

Permalink
fix: benchmarks compiling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
José Molina committed Nov 2, 2023
1 parent c125175 commit 0b5f2fc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pallets/template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
std = [
"codec/std",
"scale-info/std",
"frame-benchmarking/std",
"frame-benchmarking?/std",
"frame-support/std",
"frame-system/std",
]
Expand Down
5 changes: 3 additions & 2 deletions pallets/template/src/benchmarking.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! Benchmarking setup for pallet-template
#![cfg(feature = "runtime-benchmarks")]
use super::*;
use scale_info::prelude::vec;

#[allow(unused)]
use crate::Pallet as Template;
Expand All @@ -19,6 +20,6 @@ mod benchmarks {

assert_eq!(Something::<T>::get(), Some(s));
}
}

impl_benchmark_test_suite!(Template, crate::mock::new_test_ext(), crate::mock::Test,);
impl_benchmark_test_suite!(Template, crate::mock::new_test_ext(), crate::mock::Test,);
}
1 change: 1 addition & 0 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ runtime-benchmarks = [
"pallet-multisig/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"fp-self-contained/try-runtime",
]

try-runtime = [
Expand Down
1 change: 0 additions & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![cfg_attr(not(feature = "std"), no_std)]
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
#![recursion_limit = "256"]
#![cfg_attr(feature = "runtime-benchmarks", deny(unused_crate_dependencies))]

// Make the WASM binary available.
#[cfg(feature = "std")]
Expand Down

0 comments on commit 0b5f2fc

Please sign in to comment.