This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Description
Previously, bonded fund can be used for transaction payment so it is OK to bond all the funds and still be able to make transaction to unbond them. This is no longer possible after #3606 but the comments still says The lock will lock the entire funds except paying for further transactions.
|
/// Update the ledger for a controller. This will also update the stash lock. The lock will |
|
/// will lock the entire funds except paying for further transactions. |
|
fn update_ledger( |
|
controller: &T::AccountId, |
|
ledger: &StakingLedger<T::AccountId, BalanceOf<T>> |
|
) { |
|
T::Currency::set_lock( |
|
STAKING_ID, |
|
&ledger.stash, |
|
ledger.total, |
|
T::BlockNumber::max_value(), |
|
WithdrawReasons::all(), |
|
); |
|
<Ledger<T>>::insert(controller, ledger); |
|
} |
With WithdrawReason::Tip, it should be safe to allow TransactionPayment reason and #3364 (comment) no longer applies.