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 authored and GitHub committed 2022-03-31 12:54:44 +00:00
1 parent 7bf19fa9c9
commit 0e0d0a677a
6 files changed
+40 -4

No files matched your search

@@ -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)
);