Trait tp_election_providers::ElectionDataProvider [−][src]
Something that can provide the data to an ElectionProvider
.
Required methods
fn targets() -> Vec<AccountId>
[src]
All possible targets for the election, i.e. the candidates.
fn voters() -> Vec<(AccountId, VoteWeight, Vec<AccountId>)>
[src]
All possible voters for the election.
Note that if a notion of self-vote exists, it should be represented here.
fn desired_targets() -> u32
[src]
The number of targets to elect.
fn next_election_prediction(now: BlockNumber) -> BlockNumber
[src]
Provide a best effort prediction about when the next election is about to happen.
In essence, the implementor should predict with this function when it will trigger the
ElectionProvider::elect
.
This is only useful for stateful election providers.