Enforce MaxEncodedLen impl for NposSolution (#11103)

* Fail if `MaxVoters` too small

* Fixing benchmarking test, better naming of error

* reverting accidental change

* use fully qualified syntax
no need to interate to calculate len

* Fail directly if too many voters
This commit is contained in:
Georges
2022-03-31 13:54:44 +01:00
committed by GitHub
parent 7bf19fa9c9
commit 0e0d0a677a
6 changed files with 40 additions and 4 deletions
@@ -74,7 +74,7 @@ frame_election_provider_support::generate_solution_type!(
VoterIndex = VoterIndex,
TargetIndex = TargetIndex,
Accuracy = PerU16,
MaxVoters = ConstU32::<20>
MaxVoters = ConstU32::<2_000>
>(16)
);