pub trait Config {
    type System: Config;
    type Solver: NposSolver<AccountId = <Self::System as Config>::AccountId, Error = Error>;
    type DataProvider: ElectionDataProvider<AccountId = <Self::System as Config>::AccountId, BlockNumber = BlockNumberFor<Self::System>>;
    type WeightInfo: WeightInfo;
    type MaxWinners: Get<u32>;
    type Bounds: Get<ElectionBounds>;
}
Expand description

Configuration trait for an onchain election execution.

Required Associated Types§

source

type System: Config

Needed for weight registration.

source

type Solver: NposSolver<AccountId = <Self::System as Config>::AccountId, Error = Error>

NposSolver that should be used, an example would be PhragMMS.

source

type DataProvider: ElectionDataProvider<AccountId = <Self::System as Config>::AccountId, BlockNumber = BlockNumberFor<Self::System>>

Something that provides the data for election.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

source

type MaxWinners: Get<u32>

Upper bound on maximum winners from electable targets.

As noted in the documentation of ElectionProviderBase::MaxWinners, this value should always be more than DataProvider::desired_target.

source

type Bounds: Get<ElectionBounds>

Elections bounds, to use when calling into Config::DataProvider. It might be overwritten in the InstantElectionProvider impl.

Implementors§