Skip to content

Commit

Permalink
move ShouldEndSession to sp_session
Browse files Browse the repository at this point in the history
  • Loading branch information
akildemir authored and kayabaNerve committed Nov 15, 2023
1 parent 1036864 commit 8729593
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 1 addition & 6 deletions frame/session/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,7 @@ use sp_std::{

pub use pallet::*;
pub use weights::WeightInfo;

/// Decides whether the session should be ended.
pub trait ShouldEndSession<BlockNumber> {
/// 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.
///
Expand Down
6 changes: 6 additions & 0 deletions primitives/session/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<BlockNumber> {
/// 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 {
Expand Down

0 comments on commit 8729593

Please sign in to comment.