only register MaxCandidates-1 candidates initially (#1714)

This commit is contained in:
Kai authored and GitHub committed 2022-10-03 13:00:53 +00:00
1 parent f00417b906
commit 4f632887eb
1 file changed
+1 -1
@@ -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;
<CandidacyBond<T>>::put(T::Currency::minimum_balance());
<DesiredCandidates<T>>::put(c + 1);