paritytech / polkadot-staking-miner

polkadot staking miner
GNU General Public License v3.0
22 stars 5 forks source link

Fix: Feasibility check fails when all voters have the same staked amount #856

Closed CertainLach closed 3 days ago

CertainLach commented 6 days ago

TrimmedVotes uses BTreeMap to sort voters by stake, which results in voters with the same stake to be dropped from election.

In case if desired_targets == total_voters (on private network) it results in immediate feasibility check failure in solution_weight->epm::mock_votes, as voters < desired_targets.