fn make_payout(stash: &T::AccountId, amount: BalanceOf<T>) -> Option<PositiveImbalanceOf<T>> {
        let dest = Self::payee(stash);
        match dest {
            RewardDestination::Controller => Self::bonded(stash).and_then(|controller| {
                T::Currency::deposit_into_existing(&controller, amount).ok()
            }),
            RewardDestination::Stash => T::Currency::deposit_into_existing(stash, amount).ok(),
            RewardDestination::Staked => Self::bonded(stash)
                .and_then(|c| Self::ledger(&c).map(|l| (c, l)))
                .and_then(|(controller, mut l)| {
                    l.active += amount;
                    l.total += amount;
                    let r = T::Currency::deposit_into_existing(stash, amount).ok();
                    Self::update_ledger(&controller, &l);
                    r
                }),
            RewardDestination::Account(dest_account) => {
                Some(T::Currency::deposit_creating(&dest_account, amount))
            }
        }
    }
/// Actually make a payment to a staker. This uses the currency's reward function
/// to pay the right payee for the given staker account.
Actually make a payment to a staker. This uses the currency's reward function
to pay the right payee for the given staker account.
Actually make a payment to a staker . This uses the currency ' s reward function to pay the right payee for the given staker account .
fn make_payout(stash: &T::AccountId, amount: BalanceOf<T>) -> Option<PositiveImbalanceOf<T>> {
        let dest = Self::payee(stash);
        match dest {
            RewardDestination::Controller => Self::bonded(stash).and_then(|controller| {
                T::Currency::deposit_into_existing(&controller, amount).ok()
            }),
            RewardDestination::Stash => T::Currency::deposit_into_existing(stash, amount).ok(),
            RewardDestination::Staked => Self::bonded(stash)
                .and_then(|c| Self::ledger(&c).map(|l| (c, l)))
                .and_then(|(controller, mut l)| {
                    l.active += amount;
                    l.total += amount;
                    let r = T::Currency::deposit_into_existing(stash, amount).ok();
                    Self::update_ledger(&controller, &l);
                    r
                }),
            RewardDestination::Account(dest_account) => {
                Some(T::Currency::deposit_creating(&dest_account, amount))
            }
        }
    }
fn make_payout ( stash : & T :: AccountId , amount : BalanceOf < T > ) -> Option < PositiveImbalanceOf < T > > { let dest = Self :: payee ( stash ) ; match dest { RewardDestination :: Controller => Self :: bonded ( stash ) . and_then ( | controller | { T :: Currency :: deposit_into_existing ( & controller , amount ) . ok ( ) } ) , RewardDestination :: Stash => T :: Currency :: deposit_into_existing ( stash , amount ) . ok ( ) , RewardDestination :: Staked => Self :: bonded ( stash ) . and_then ( | c | Self :: ledger ( & c ) . map ( | l | ( c , l ) ) ) . and_then ( | ( controller , mut l ) | { l . active += amount ; l . total += amount ; let r = T :: Currency :: deposit_into_existing ( stash , amount ) . ok ( ) ; Self :: update_ledger ( & controller , & l ) ; r } ) , RewardDestination :: Account ( dest_account ) => { Some ( T :: Currency :: deposit_creating ( & dest_account , amount ) ) } } }
Actually make a payment to a staker.
Actually make a payment to a staker .
stash
&T::AccountId
amount
BalanceOf<T>