Max class voters for ranked collective vote tally#13313
Max class voters for ranked collective vote tally#13313paritytech-processbot[bot] merged 7 commits intomasterfrom
Conversation
gavofyork
left a comment
There was a problem hiding this comment.
Looks ok in general, but are Rank and Class not already defined as equivalent within ranked-collective's VoteTally impl because its Class generic parameter is provided as Rank?
I see it now. substrate/frame/ranked-collective/src/lib.rs Line 343 in 37e3abd The signatures of the VoteTally funcs impls becomes confusing to me, the name of the arg is class, the type is Rank, but docs will help -substrate/frame/ranked-collective/src/lib.rs Line 140 in 37e3abd I faced the issue, while trying to define the Class as enum.We can go either way, generic class (like in the PR now) or class type is rank type, but I make it more explicit and add some docs. |
|
bot rebase |
|
Rebased |
|
bot rebase |
|
Rebased |
|
bot merge |
|
Waiting for commit status. |
* max class voters for vote tally * fix move * tests * rename to GetMaxVoters * saturating sub --------- Co-authored-by: parity-processbot <>
* max class voters for vote tally * fix move * tests * rename to GetMaxVoters * saturating sub --------- Co-authored-by: parity-processbot <>
The implementation of
VoteTallytrait, usesRanktype whereClassis supposed.For Kusama runtime, this is not an issue. The
RankandClassis the same u16 type and mapped 1:1.But if,
Classis any other type (e.g. enum), it wont compile.// DONE tests