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§
Sourcetype ValidatorId: Clone
type ValidatorId: Clone
The validator id type of the session pallet
Required Methods§
fn validators() -> Vec<Self::ValidatorId>
Sourcefn prune_up_to(index: SessionIndex)
fn prune_up_to(index: SessionIndex)
prune up to the given session index.
Sourcefn report_offence(offender: Self::ValidatorId, severity: OffenceSeverity)
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.