Remove dead code in Staking (#3559)

* Remove some dead code from staking

* Fix var name.
This commit is contained in:
Kian Paimani
2019-09-06 13:39:55 +02:00
committed by Bastian Köcher
parent 551a9e6bcb
commit 202271d0a1
+2 -6
View File
@@ -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.