From 46ae40c14882144eb969c68927afd1a0c2f9ad2b Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Sun, 21 Feb 2021 18:29:17 +0100 Subject: [PATCH] pallet-staking: add RewardDestination::None for explictly not receiving rewards --- frame/staking/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index 3ea66e937e83c..d1f90bd18c6ff 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -439,6 +439,8 @@ pub enum RewardDestination { Controller, /// Pay into a specified account. Account(AccountId), + /// Receive no reward. + None, } impl Default for RewardDestination { @@ -2469,7 +2471,8 @@ impl Module { }), RewardDestination::Account(dest_account) => { Some(T::Currency::deposit_creating(&dest_account, amount)) - } + }, + RewardDestination::None => None, } }