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.

Allow pallet-election-provider to accept smaller solutions as well #9478

@crystalin

Description

@crystalin

This is taken from a relay network based on westend-local.
After some modification we finished an era with 7 targets, and a staking desired target of 10.

When trying to submit a solution for the election the feasibility_check fails because of this check:

ensure!(winners.len() as u32 == desired_targets, FeasibilityError::WrongWinnerCount);

https://github.com/paritytech/substrate/blob/master/frame/election-provider-multi-phase/src/lib.rs#L1367

I'm not sure if it is a valid check here or if this should check if the winners is not over the desired_targets only.
(cc @JoshOrndorff and @kianenigma )

Metadata

Metadata

Assignees

No one assigned

    Labels

    J0-enhancementAn additional feature request.

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions