only register MaxCandidates-1 candidates initially (#1714)

This commit is contained in:
Kai
2022-10-03 15:00:53 +02:00
committed by GitHub
parent 7c8a9ff2aa
commit f5b18604c9
@@ -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);