From ce763aaa29d05e6120fa24a595e11a7549ce31c9 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Fri, 18 Aug 2023 14:19:18 +0200 Subject: [PATCH] export WeightInfo to allow different node template benchmarks --- pallets/author-inherent/src/lib.rs | 3 +-- pallets/author-mapping/src/lib.rs | 2 +- pallets/author-slot-filter/src/lib.rs | 3 ++- pallets/randomness/src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pallets/author-inherent/src/lib.rs b/pallets/author-inherent/src/lib.rs index bd55514..d500f52 100644 --- a/pallets/author-inherent/src/lib.rs +++ b/pallets/author-inherent/src/lib.rs @@ -29,8 +29,8 @@ use sp_inherents::{InherentIdentifier, IsFatalError}; use sp_runtime::{ConsensusEngineId, RuntimeString}; mod exec; +pub use crate::weights::WeightInfo; pub use exec::BlockExecutor; - pub use pallet::*; #[cfg(any(test, feature = "runtime-benchmarks"))] @@ -46,7 +46,6 @@ mod tests; #[frame_support::pallet] pub mod pallet { use super::*; - use crate::weights::WeightInfo; use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; diff --git a/pallets/author-mapping/src/lib.rs b/pallets/author-mapping/src/lib.rs index 7bc4918..439fb47 100644 --- a/pallets/author-mapping/src/lib.rs +++ b/pallets/author-mapping/src/lib.rs @@ -29,7 +29,7 @@ use frame_support::pallet; pub use pallet::*; pub mod weights; -use weights::WeightInfo; +pub use weights::WeightInfo; #[cfg(any(test, feature = "runtime-benchmarks"))] mod benchmarks; #[cfg(test)] diff --git a/pallets/author-slot-filter/src/lib.rs b/pallets/author-slot-filter/src/lib.rs index ef53e7a..c1d8e45 100644 --- a/pallets/author-slot-filter/src/lib.rs +++ b/pallets/author-slot-filter/src/lib.rs @@ -27,6 +27,7 @@ use frame_support::pallet; +pub use crate::weights::WeightInfo; pub use pallet::*; #[cfg(any(test, feature = "runtime-benchmarks"))] @@ -44,7 +45,7 @@ mod tests; #[allow(deprecated)] #[pallet] pub mod pallet { - + use super::*; use crate::num::NonZeroU32; use crate::weights::WeightInfo; use frame_support::{pallet_prelude::*, traits::Randomness}; diff --git a/pallets/randomness/src/lib.rs b/pallets/randomness/src/lib.rs index b37bcfb..40a16f4 100644 --- a/pallets/randomness/src/lib.rs +++ b/pallets/randomness/src/lib.rs @@ -52,6 +52,7 @@ #![cfg_attr(not(feature = "std"), no_std)] +pub use crate::weights::WeightInfo; use frame_support::pallet; pub use pallet::*; use sp_std::vec::Vec; @@ -77,7 +78,6 @@ pub trait GetBabeData { #[pallet] pub mod pallet { use super::*; - use crate::weights::WeightInfo; use frame_support::traits::{Currency, ExistenceRequirement::KeepAlive}; use frame_support::{pallet_prelude::*, PalletId}; use frame_system::pallet_prelude::*;