diff --git a/frame/session/src/lib.rs b/frame/session/src/lib.rs index 22bd5c55d0f6b..89f182b769a69 100644 --- a/frame/session/src/lib.rs +++ b/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/primitives/session/src/lib.rs b/primitives/session/src/lib.rs index 339e0656ce582..38213d4a6ca9e 100644 --- a/primitives/session/src/lib.rs +++ b/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 {