referrerpolicy=no-referrer-when-downgrade

IsValidatorInactive

Trait IsValidatorInactive 

Source
pub trait IsValidatorInactive<AccountId> {
    // Required method
    fn is_inactive(
        era: EraIndex,
        stash: &AccountId,
        points: &[(ServiceKind, RewardPoint)],
    ) -> bool;
}
Expand description

Check if validator was inactive at some era.

The check is based on the RewardPoints the validator received during the era, per [ServiceKind].

Required Methods§

Source

fn is_inactive( era: EraIndex, stash: &AccountId, points: &[(ServiceKind, RewardPoint)], ) -> bool

Tell if the validator is considered inactive in era, given its points per service.

A service the validator earned nothing for may be missing from points. Points of eras before they were recorded per service count as [ServiceKind::RelayConsensus].

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.

Implementations on Foreign Types§

Source§

impl<AccountId> IsValidatorInactive<AccountId> for ()

A validator is never inactive, so no validator can be chilled for inactivity.

Source§

fn is_inactive( _era: EraIndex, _stash: &AccountId, _points: &[(ServiceKind, RewardPoint)], ) -> bool

Implementors§

Source§

impl<AccountId> IsValidatorInactive<AccountId> for AllZero