Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

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

Merged
merged 1 commit into from
Mar 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion frame/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ pub enum RewardDestination<AccountId> {
Controller,
/// Pay into a specified account.
Account(AccountId),
/// Receive no reward.
None,
}

impl<AccountId> Default for RewardDestination<AccountId> {
Expand Down Expand Up @@ -2469,7 +2471,8 @@ impl<T: Config> Module<T> {
}),
RewardDestination::Account(dest_account) => {
Some(T::Currency::deposit_creating(&dest_account, amount))
}
},
RewardDestination::None => None,
}
}

Expand Down