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 f00417b906
commit 4f632887eb
@@ -147,7 +147,7 @@ benchmarks! {
// worse case is when we have all the max-candidate slots filled except one, and we fill that // worse case is when we have all the max-candidate slots filled except one, and we fill that
// one. // one.
register_as_candidate { 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()); <CandidacyBond<T>>::put(T::Currency::minimum_balance());
<DesiredCandidates<T>>::put(c + 1); <DesiredCandidates<T>>::put(c + 1);