Skip to content

Commit

Permalink
additional check
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci committed Aug 23, 2024
1 parent 62c1d85 commit dffa121
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pallets/collator-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,14 +561,14 @@ pub mod pallet {
if now.saturating_sub(last_authored) < kick_threshold {
continue;
}
// still candidate, kick and slash
// stale candidate, kick and slash
if Self::is_account_candidate(&who) {
if Candidates::<T>::get().len() > T::MinCandidates::get() as usize {
// no error, who is a candidate
let _ = Self::try_remove_candidate(&who);
Self::slash_non_candidate(&who);
}
} else {
} else if NonCandidates::<T>::contains_key(&who) {
let (locked_until, _) = NonCandidates::<T>::get(&who);
if T::ValidatorSet::session_index() > locked_until {
// bond is already unlocked
Expand Down

0 comments on commit dffa121

Please sign in to comment.