[−][src]Trait sp_staking::offence::OnOffenceHandler
A trait to take action on an offence.
Used to decouple the module that handles offences and the one that should punish for those offences.
Required methods
fn on_offence(
offenders: &[OffenceDetails<Reporter, Offender>],
slash_fraction: &[Perbill],
session: SessionIndex
)
offenders: &[OffenceDetails<Reporter, Offender>],
slash_fraction: &[Perbill],
session: SessionIndex
)
A handler for an offence of a particular kind.
Note that this contains a list of all previous offenders
as well. The implementer should cater for a case, where
the same authorities were reported for the same offence
in the past (see OffenceCount
).
The vector of slash_fraction
contains Perbill
s
the authorities should be slashed and is computed
according to the OffenceCount
already. This is of the same length as offenders.
Zero is a valid value for a fraction.
The session
parameter is the session index of the offence.
Implementations on Foreign Types
impl<Reporter, Offender> OnOffenceHandler<Reporter, Offender> for ()
[src]
fn on_offence(
_offenders: &[OffenceDetails<Reporter, Offender>],
_slash_fraction: &[Perbill],
_session: SessionIndex
)
[src]
_offenders: &[OffenceDetails<Reporter, Offender>],
_slash_fraction: &[Perbill],
_session: SessionIndex
)