mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 02:21:14 +00:00
Sensible locking for staking and council. (#3050)
* Sensible locking for staking and council. * Bump.
This commit is contained in:
@@ -278,7 +278,7 @@ use srml_support::{
|
||||
StorageValue, StorageMap, EnumerableStorageMap, decl_module, decl_event,
|
||||
decl_storage, ensure, traits::{
|
||||
Currency, OnFreeBalanceZero, OnDilution, LockIdentifier, LockableCurrency,
|
||||
WithdrawReasons, OnUnbalanced, Imbalance, Get
|
||||
WithdrawReasons, WithdrawReason, OnUnbalanced, Imbalance, Get
|
||||
}
|
||||
};
|
||||
use session::{historical::OnSessionEnding, SelectInitialValidators, SessionIndex};
|
||||
@@ -969,7 +969,8 @@ impl<T: Trait> Module<T> {
|
||||
|
||||
// MUTABLES (DANGEROUS)
|
||||
|
||||
/// Update the ledger for a controller. This will also update the stash lock.
|
||||
/// 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>>
|
||||
@@ -979,7 +980,7 @@ impl<T: Trait> Module<T> {
|
||||
&ledger.stash,
|
||||
ledger.total,
|
||||
T::BlockNumber::max_value(),
|
||||
WithdrawReasons::all()
|
||||
WithdrawReasons::except(WithdrawReason::TransactionPayment),
|
||||
);
|
||||
<Ledger<T>>::insert(controller, ledger);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user