pallet-staking: add RewardDestination::None for explictly not receiving rewards (#8168)

This commit is contained in:
Wei Tang
2021-03-11 16:22:16 +01:00
committed by GitHub
parent 5f004b4428
commit fb4b9755bb
+4 -1
View File
@@ -443,6 +443,8 @@ pub enum RewardDestination<AccountId> {
Controller,
/// Pay into a specified account.
Account(AccountId),
/// Receive no reward.
None,
}
impl<AccountId> Default for RewardDestination<AccountId> {
@@ -2499,7 +2501,8 @@ impl<T: Config> Module<T> {
}),
RewardDestination::Account(dest_account) => {
Some(T::Currency::deposit_creating(&dest_account, amount))
}
},
RewardDestination::None => None,
}
}