pub fn compute_slash<T: Config>(
    params: SlashParams<'_, T>
) -> Option<UnappliedSlash<T::AccountId, RingBalance<T>, KtonBalance<T>>>
Expand description

Computes a slash of a validator and nominators. It returns an unapplied record to be applied at some later point. Slashing metadata is updated in storage, since unapplied records are only rarely intended to be dropped.

The pending slash record returned does not have initialized reporters. Those have to be set at a higher level, if any.