Skip to content
Snippets Groups Projects
Commit 202271d0 authored by Kian Paimani's avatar Kian Paimani Committed by Bastian Köcher
Browse files

Remove dead code in Staking (#3559)

* Remove some dead code from staking

* Fix var name.
parent 551a9e6b
Branches
No related merge requests found
......@@ -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.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment