Trait pallet_curveless_staking::SessionInterface[][src]

pub trait SessionInterface<AccountId>: Config {
    fn disable_validator(validator: &AccountId) -> Result<bool, ()>;
fn validators() -> Vec<AccountId>;
fn prune_historical_up_to(up_to: SessionIndex); }

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

fn disable_validator(validator: &AccountId) -> Result<bool, ()>[src]

Disable a given validator by stash ID.

Returns true if new era should be forced at the end of this session. This allows preventing a situation where there is too many validators disabled and block production stalls.

fn validators() -> Vec<AccountId>[src]

Get the validators from session.

fn prune_historical_up_to(up_to: SessionIndex)[src]

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

Loading content...

Implementors

impl<T: Config> SessionInterface<<T as Config>::AccountId> for T where
    T: Config<ValidatorId = <T as Config>::AccountId>,
    T: Config<FullIdentification = Exposure<<T as Config>::AccountId, BalanceOf<T>>, FullIdentificationOf = ExposureOf<T>>,
    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>>, 
[src]

Loading content...