diff --git a/validator/weight_setting/winner_selection.py b/validator/weight_setting/winner_selection.py index f96dcbeb..21d50d00 100644 --- a/validator/weight_setting/winner_selection.py +++ b/validator/weight_setting/winner_selection.py @@ -22,9 +22,15 @@ def get_contestant_ranks(scores: dict[Key, float]) -> dict[Key, int]: if not scores: return {} - i = 0 rank = 0 + if len(scores) == 1: + hotkey = next(iter(scores)) + + return { hotkey: rank } + + i = 0 + scores = list(sorted(scores.items(), key=itemgetter(1), reverse=True)) score_values = list(map(itemgetter(1), scores))