Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Enforce MaxEncodedLen impl for NposSolution #11092

@kianenigma

Description

@kianenigma

See: https://github.com/paritytech/substrate/pull/11032/files#r832354293 (#11032)

okay, so about these, we need a follow up issue to try and actually enforce this bound.

It should not be too hard, we only ever create this type in a single function, from_assignments, and in there, we need to sum up all the fields (votes1, votes2, ...) and make sure they are less than MaxVoters::len().

I will make a new issue for this so you can do it as a follow-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.Z6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions