mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
Removes the Default implementation for RewardDestination (#2402)
This PR removes current default for `RewardDestination`, which may cause confusion since a ledger should not have a default reward destination: either it has a reward destination, or something is wrong. It also changes the `Payee`'s reward destination in storage from `ValueQuery` to `OptionQuery`. In addition, it adds a `try_state` check to make sure each bonded ledger have a valid reward destination. Closes https://github.com/paritytech/polkadot-sdk/issues/2063 --------- Co-authored-by: command-bot <> Co-authored-by: Ross Bulat <ross@parity.io>
This commit is contained in:
@@ -214,7 +214,10 @@ fn pool_slash_e2e() {
|
||||
]
|
||||
);
|
||||
|
||||
assert_eq!(Payee::<Runtime>::get(POOL1_BONDED), RewardDestination::Account(POOL1_REWARD));
|
||||
assert_eq!(
|
||||
Payee::<Runtime>::get(POOL1_BONDED),
|
||||
Some(RewardDestination::Account(POOL1_REWARD))
|
||||
);
|
||||
|
||||
// have two members join
|
||||
assert_ok!(Pools::join(RuntimeOrigin::signed(20), 20, 1));
|
||||
|
||||
Reference in New Issue
Block a user