pub trait Config: Config + Config<RuntimeEvent: From<Event<Self>>> {
type SolutionImprovementThreshold: Get<Perbill>;
type MaxBackersPerWinnerFinal: Get<u32>;
type MaxBackersPerWinner: Get<u32>;
type MaxWinnersPerPage: Get<u32>;
type SolutionDataProvider: SolutionDataProvider<Solution = SolutionOf<Self::MinerConfig>>;
type WeightInfo: WeightInfo;
}
Expand description
Configuration trait of this pallet.
The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.
Consequently, a runtime that wants to include this pallet must implement this trait.
Required Associated Types§
Sourcetype SolutionImprovementThreshold: Get<Perbill>
type SolutionImprovementThreshold: Get<Perbill>
The minimum amount of improvement to the solution score that defines a solution as “better”.
Sourcetype MaxBackersPerWinnerFinal: Get<u32>
type MaxBackersPerWinnerFinal: Get<u32>
Maximum number of backers, per winner, among all pages of an election.
This can only be checked at the very final step of verification.
NOTE: at the moment, we don’t check this, and it is in place for future compatibility.
Sourcetype MaxBackersPerWinner: Get<u32>
type MaxBackersPerWinner: Get<u32>
Maximum number of backers, per winner, per page.
Sourcetype MaxWinnersPerPage: Get<u32>
type MaxWinnersPerPage: Get<u32>
Maximum number of supports (aka. winners/validators/targets) that can be represented in a page of results.
Sourcetype SolutionDataProvider: SolutionDataProvider<Solution = SolutionOf<Self::MinerConfig>>
type SolutionDataProvider: SolutionDataProvider<Solution = SolutionOf<Self::MinerConfig>>
Something that can provide the solution data to the verifier.
In reality, this will be fulfilled by the signed phase.
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
The weight information of this pallet.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.