Staking: Add dest to Rewarded to aid in reward calculations (#1602)

Addresses https://github.com/paritytech/polkadot-sdk/issues/129.

Returns `Self:payee()` from `make_payout` in a tuple alongside an
imbalance & adds it to `Rewarded` event.
This commit is contained in:
Ross Bulat
2023-09-18 18:32:30 +01:00
committed by GitHub
parent a181ced46b
commit ffe5db0f76
3 changed files with 31 additions and 10 deletions
+6 -2
View File
@@ -664,8 +664,12 @@ pub mod pallet {
/// The era payout has been set; the first balance is the validator-payout; the second is
/// the remainder from the maximum amount of reward.
EraPaid { era_index: EraIndex, validator_payout: BalanceOf<T>, remainder: BalanceOf<T> },
/// The nominator has been rewarded by this amount.
Rewarded { stash: T::AccountId, amount: BalanceOf<T> },
/// The nominator has been rewarded by this amount to this destination.
Rewarded {
stash: T::AccountId,
dest: RewardDestination<T::AccountId>,
amount: BalanceOf<T>,
},
/// A staker (validator or nominator) has been slashed by the given amount.
Slashed { staker: T::AccountId, amount: BalanceOf<T> },
/// A slash for the given validator, for the given percentage of their stake, at the given