pub trait InstantElectionProvider: ElectionProviderBase {
    // Required method
    fn instant_elect(
        forced_input_voters_bound: DataProviderBounds,
        forced_input_target_bound: DataProviderBounds
    ) -> Result<BoundedSupportsOf<Self>, Self::Error>;
}
Expand description

A (almost) marker trait that signifies an election provider as working synchronously. i.e. being instant.

This must still use the same data provider as with ElectionProviderBase::DataProvider. However, it can optionally overwrite the amount of voters and targets that are fetched from the data provider at runtime via forced_input_voters_bound and forced_input_target_bound.

Required Methods§

source

fn instant_elect( forced_input_voters_bound: DataProviderBounds, forced_input_target_bound: DataProviderBounds ) -> Result<BoundedSupportsOf<Self>, Self::Error>

Implementors§

source§

impl<AccountId, BlockNumber, DataProvider, MaxWinners> InstantElectionProvider for NoElection<(AccountId, BlockNumber, DataProvider, MaxWinners)>where DataProvider: ElectionDataProvider<AccountId = AccountId, BlockNumber = BlockNumber>, MaxWinners: Get<u32>,

source§

impl<T: Config> InstantElectionProvider for OnChainExecution<T>