referrerpolicy=no-referrer-when-downgrade
frame_support::traits

Trait ValidatorSet

Source
pub trait ValidatorSet<AccountId> {
    type ValidatorId: Parameter + MaxEncodedLen;
    type ValidatorIdOf: Convert<AccountId, Option<Self::ValidatorId>>;

    // Required methods
    fn session_index() -> SessionIndex;
    fn validators() -> Vec<Self::ValidatorId>;
}
Expand description

A trait for online node inspection in a session.

Something that can give information about the current validator set.

Required Associated Types§

Source

type ValidatorId: Parameter + MaxEncodedLen

Type for representing validator id in a session.

Source

type ValidatorIdOf: Convert<AccountId, Option<Self::ValidatorId>>

A type for converting AccountId to ValidatorId.

Required Methods§

Source

fn session_index() -> SessionIndex

Returns current session index.

Source

fn validators() -> Vec<Self::ValidatorId>

Returns the active set of validators.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

impl<T: Config> ValidatorSet<<T as Config>::AccountId> for Pallet<T>

impl<T: Config> ValidatorSet<<T as Config>::AccountId> for Pallet<T>