From 2e6a63a31539f49cb061cdec78d663e5450790d7 Mon Sep 17 00:00:00 2001 From: Ermal Kaleci Date: Wed, 26 Jun 2024 20:32:21 +0200 Subject: [PATCH] rename method --- pallets/collator-selection/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pallets/collator-selection/src/lib.rs b/pallets/collator-selection/src/lib.rs index 6846aa4567..f1a7eed694 100644 --- a/pallets/collator-selection/src/lib.rs +++ b/pallets/collator-selection/src/lib.rs @@ -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::::mutate_exists(who, |maybe| { if let Some((_index, deposit)) = maybe.take() { let slash = T::SlashRatio::get() * deposit; @@ -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)