From fb4b9755bb7793348402a7c989cc940974e3153e Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Thu, 11 Mar 2021 16:22:16 +0100 Subject: [PATCH] pallet-staking: add RewardDestination::None for explictly not receiving rewards (#8168) --- substrate/frame/staking/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/substrate/frame/staking/src/lib.rs b/substrate/frame/staking/src/lib.rs index 7f51d246c6..544ae29b0e 100644 --- a/substrate/frame/staking/src/lib.rs +++ b/substrate/frame/staking/src/lib.rs @@ -443,6 +443,8 @@ pub enum RewardDestination { Controller, /// Pay into a specified account. Account(AccountId), + /// Receive no reward. + None, } impl Default for RewardDestination { @@ -2499,7 +2501,8 @@ impl Module { }), RewardDestination::Account(dest_account) => { Some(T::Currency::deposit_creating(&dest_account, amount)) - } + }, + RewardDestination::None => None, } }