referrerpolicy=no-referrer-when-downgrade

Trait SessionInterface

Source
pub trait SessionInterface {
    type ValidatorId: Clone;

    // Required methods
    fn validators() -> Vec<Self::ValidatorId>;
    fn prune_up_to(index: SessionIndex);
    fn report_offence(offender: Self::ValidatorId, severity: OffenceSeverity);
}
Expand description

Interface to talk to the local session pallet.

Required Associated Types§

Source

type ValidatorId: Clone

The validator id type of the session pallet

Required Methods§

Source

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

Source

fn prune_up_to(index: SessionIndex)

prune up to the given session index.

Source

fn report_offence(offender: Self::ValidatorId, severity: OffenceSeverity)

Report an offence.

This is used to disable validators directly on the RC, until the next validator set.

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§

Source§

impl<T: Config + Config + Config> SessionInterface for T

Source§

type ValidatorId = <T as Config>::ValidatorId