mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 21:01:03 +00:00
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:
@@ -119,12 +119,14 @@ pub enum Error {
|
||||
SolutionTargetOverflow,
|
||||
/// One of the index functions returned none.
|
||||
SolutionInvalidIndex,
|
||||
/// One of the page indices was invalid
|
||||
/// One of the page indices was invalid.
|
||||
SolutionInvalidPageIndex,
|
||||
/// An error occurred in some arithmetic operation.
|
||||
ArithmeticError(&'static str),
|
||||
/// The data provided to create support map was invalid.
|
||||
InvalidSupportEdge,
|
||||
/// The number of voters is bigger than the `MaxVoters` bound.
|
||||
TooManyVoters,
|
||||
}
|
||||
|
||||
/// A type which is used in the API of this crate as a numeric weight of a vote, most often the
|
||||
|
||||
Reference in New Issue
Block a user