pub trait SessionHandler<ValidatorId> {
    const KEY_TYPE_IDS: &'static [KeyTypeId];

    fn on_genesis_session<Ks: OpaqueKeys>(validators: &[(ValidatorId, Ks)]);
    fn on_new_session<Ks: OpaqueKeys>(
        changed: bool,
        validators: &[(ValidatorId, Ks)],
        queued_validators: &[(ValidatorId, Ks)]
    ); fn on_disabled(validator_index: u32); fn on_before_session_ending() { ... } }
Expand description

Handler for session life cycle events.

Required Associated Constants§

All the key type ids this session handler can process.

The order must be the same as it expects them in on_new_session and on_genesis_session.

Required Methods§

The given validator set will be used for the genesis session. It is guaranteed that the given validator set will also be used for the second session, therefore the first call to on_new_session should provide the same validator set.

Session set has changed; act appropriately. Note that this can be called before initialization of your pallet.

changed is true whenever any of the session keys or underlying economic identities or weightings behind those keys has changed.

A validator got disabled. Act accordingly until a new session begins.

Provided Methods§

A notification for end of the session.

Note it is triggered before any SessionManager::end_session handlers, so we can still affect the validator set.

Implementations on Foreign Types§

Implementors§