mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
Remove dead code in Staking (#3559)
* Remove some dead code from staking * Fix var name.
This commit is contained in:
committed by
Bastian Köcher
parent
551a9e6bcb
commit
202271d0a1
@@ -1001,8 +1001,8 @@ impl<T: Trait> Module<T> {
|
||||
|
||||
/// The total balance that can be slashed from a validator controller account as of
|
||||
/// right now.
|
||||
pub fn slashable_balance(who: &T::AccountId) -> BalanceOf<T> {
|
||||
Self::stakers(who).total
|
||||
pub fn slashable_balance_of(stash: &T::AccountId) -> BalanceOf<T> {
|
||||
Self::bonded(stash).and_then(Self::ledger).map(|l| l.active).unwrap_or_default()
|
||||
}
|
||||
|
||||
// MUTABLES (DANGEROUS)
|
||||
@@ -1231,10 +1231,6 @@ impl<T: Trait> Module<T> {
|
||||
maybe_new_validators
|
||||
}
|
||||
|
||||
fn slashable_balance_of(stash: &T::AccountId) -> BalanceOf<T> {
|
||||
Self::bonded(stash).and_then(Self::ledger).map(|l| l.active).unwrap_or_default()
|
||||
}
|
||||
|
||||
/// Select a new validator set from the assembled stakers and their role preferences.
|
||||
///
|
||||
/// Returns the new `SlotStake` value and a set of newly selected _stash_ IDs.
|
||||
|
||||
Reference in New Issue
Block a user