From f5b18604c9be5669cca98377423c914031536d20 Mon Sep 17 00:00:00 2001 From: Kai <7630809+Kailai-Wang@users.noreply.github.com> Date: Mon, 3 Oct 2022 15:00:53 +0200 Subject: [PATCH] only register MaxCandidates-1 candidates initially (#1714) --- pallets/collator-selection/src/benchmarking.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/collator-selection/src/benchmarking.rs b/pallets/collator-selection/src/benchmarking.rs index f5467fbd09..2f4043092a 100644 --- a/pallets/collator-selection/src/benchmarking.rs +++ b/pallets/collator-selection/src/benchmarking.rs @@ -147,7 +147,7 @@ benchmarks! { // worse case is when we have all the max-candidate slots filled except one, and we fill that // one. register_as_candidate { - let c in 1 .. T::MaxCandidates::get(); + let c in 1 .. T::MaxCandidates::get() - 1; >::put(T::Currency::minimum_balance()); >::put(c + 1);