Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci committed Jun 26, 2024
1 parent 9724f32 commit 2e6a63a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pallets/collator-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ pub mod pallet {
}

/// Slash candidate deposit and return the rest of funds.
fn slash_unbonding_candidate(who: &T::AccountId) {
fn slash_non_candidate(who: &T::AccountId) {
NonCandidates::<T>::mutate_exists(who, |maybe| {
if let Some((_index, deposit)) = maybe.take() {
let slash = T::SlashRatio::get() * deposit;
Expand Down Expand Up @@ -552,11 +552,11 @@ pub mod pallet {
log::warn!("Failed to remove candidate {:?}", why);
continue;
}
Self::slash_unbonding_candidate(&who);
Self::slash_non_candidate(&who);
}
} else {
// slash un-bonding candidate
Self::slash_unbonding_candidate(&who);
Self::slash_non_candidate(&who);
}
}
(count, count - Self::candidates().len() as u32)
Expand Down

0 comments on commit 2e6a63a

Please sign in to comment.