mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
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:
@@ -3759,6 +3759,16 @@ fn test_payout_stakers() {
|
||||
);
|
||||
assert!(RewardOnUnbalanceWasCalled::get());
|
||||
|
||||
// `Rewarded` events are being executed.
|
||||
assert!(matches!(
|
||||
staking_events_since_last_call().as_slice(),
|
||||
&[
|
||||
..,
|
||||
Event::Rewarded { stash: 1037, dest: RewardDestination::Controller, amount: 108 },
|
||||
Event::Rewarded { stash: 1036, dest: RewardDestination::Controller, amount: 108 }
|
||||
]
|
||||
));
|
||||
|
||||
// Top 64 nominators of validator 11 automatically paid out, including the validator
|
||||
// Validator payout goes to controller.
|
||||
assert!(Balances::free_balance(&11) > balance);
|
||||
|
||||
Reference in New Issue
Block a user