diff --git a/substrate/frame/session/src/lib.rs b/substrate/frame/session/src/lib.rs index e05348c149b4..5f97dd05bbb0 100644 --- a/substrate/frame/session/src/lib.rs +++ b/substrate/frame/session/src/lib.rs @@ -141,12 +141,7 @@ use sp_std::{ pub use pallet::*; pub use weights::WeightInfo; - -/// Decides whether the session should be ended. -pub trait ShouldEndSession { - /// Return `true` if the session should be ended. - fn should_end_session(now: BlockNumber) -> bool; -} +pub use sp_session::ShouldEndSession; /// Ends the session after a fixed period of blocks. /// diff --git a/substrate/primitives/session/src/lib.rs b/substrate/primitives/session/src/lib.rs index 339e0656ce58..38213d4a6ca9 100644 --- a/substrate/primitives/session/src/lib.rs +++ b/substrate/primitives/session/src/lib.rs @@ -53,6 +53,12 @@ sp_api::decl_runtime_apis! { /// Number of validators in a given session. pub type ValidatorCount = u32; +/// Decides whether the session should be ended. +pub trait ShouldEndSession { + /// Return `true` if the session should be ended. + fn should_end_session(now: BlockNumber) -> bool; +} + /// Proof of membership of a specific key in a given session. #[derive(Encode, Decode, Clone, Eq, PartialEq, Default, RuntimeDebug, scale_info::TypeInfo)] pub struct MembershipProof {