mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 15:11:02 +00:00
Allow pallet-election-provider to accept smaller solutions as well (#10905)
* Allow `pallet-election-provider` to accept smaller solutions, issue #9478 * Fixing a typo * Adding some more tests Removing a seemingly outdated comment * making it a URL * Updating test name as per suggestion Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Updating documentation to be more explicit And to follow the general guidelines Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Fixing formatting Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -289,6 +289,12 @@ pub trait ElectionDataProvider {
|
||||
///
|
||||
/// This should be implemented as a self-weighing function. The implementor should register its
|
||||
/// appropriate weight at the end of execution with the system pallet directly.
|
||||
///
|
||||
/// A sensible implementation should use the minimum between this value and
|
||||
/// [`Self::targets().len()`], since desiring a winner set larger than candidates is not
|
||||
/// feasible.
|
||||
///
|
||||
/// This is documented further in issue: <https://github.com/paritytech/substrate/issues/9478>
|
||||
fn desired_targets() -> data_provider::Result<u32>;
|
||||
|
||||
/// Provide a best effort prediction about when the next election is about to happen.
|
||||
|
||||
Reference in New Issue
Block a user