staking: Fix Reward usage (#10887)

* staking: Fix `Reward` usage

* Some small fixes

* Check on_unbalanced was called

* Improve tests

* Add not for Reward; FMT

* 🤦

Co-authored-by: parity-processbot <>
This commit is contained in:
Zeke Mostov
2022-04-21 06:50:17 -07:00
committed by GitHub
parent 806f6cc683
commit 97f5193137
4 changed files with 50 additions and 6 deletions
@@ -121,6 +121,8 @@ pub mod pallet {
type Slash: OnUnbalanced<NegativeImbalanceOf<Self>>;
/// Handler for the unbalanced increment when rewarding a staker.
/// NOTE: in most cases, the implementation of `OnUnbalanced` should modify the total
/// issuance.
type Reward: OnUnbalanced<PositiveImbalanceOf<Self>>;
/// Number of sessions per era.