pub trait OnStakerSlash<AccountId, Balance> {
    // Required method
    fn on_slash(
        stash: &AccountId,
        slashed_active: Balance,
        slashed_unlocking: &BTreeMap<EraIndex, Balance>
    );
}
Expand description

Trait describing something that implements a hook for any operations to perform when a staker is slashed.

Required Methods§

source

fn on_slash( stash: &AccountId, slashed_active: Balance, slashed_unlocking: &BTreeMap<EraIndex, Balance> )

A hook for any operations to perform when a staker is slashed.

Arguments
  • stash - The stash of the staker whom the slash was applied to.
  • slashed_active - The new bonded balance of the staker after the slash was applied.
  • slashed_unlocking - A map of slashed eras, and the balance of that unlocking chunk after the slash is applied. Any era not present in the map is not affected at all.

Implementations on Foreign Types§

source§

impl<AccountId, Balance> OnStakerSlash<AccountId, Balance> for ()

source§

fn on_slash(_: &AccountId, _: Balance, _: &BTreeMap<EraIndex, Balance>)

Implementors§