pub trait SessionInterface<AccountId> {
    // Required methods
    fn disable_validator(validator_index: u32) -> bool;
    fn validators() -> Vec<AccountId>;
    fn prune_historical_up_to(up_to: SessionIndex);
}
Expand description

Means for interacting with a specialized version of the session trait.

This is needed because Staking sets the ValidatorIdOf of the pallet_session::Config

Required Methods§

source

fn disable_validator(validator_index: u32) -> bool

Disable the validator at the given index, returns false if the validator was already disabled or the index is out of bounds.

source

fn validators() -> Vec<AccountId>

Get the validators from session.

source

fn prune_historical_up_to(up_to: SessionIndex)

Prune historical session tries up to but not including the given index.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<AccountId> SessionInterface<AccountId> for ()

Implementors§

source§

impl<T> SessionInterface<<T as Config>::AccountId> for T
where T: Config<ValidatorId = <T as Config>::AccountId> + Config<FullIdentification = Exposure<<T as Config>::AccountId, BalanceOf<T>>, FullIdentificationOf = ExposureOf<T>> + Config, T::SessionHandler: SessionHandler<<T as Config>::AccountId>, T::SessionManager: SessionManager<<T as Config>::AccountId>, T::ValidatorIdOf: Convert<<T as Config>::AccountId, Option<<T as Config>::AccountId>>,