pub trait MinerConfig {
    type AccountId: Ord + Clone + Codec + Debug;
    type Solution: Codec + Default + PartialEq + Eq + Clone + Debug + Ord + NposSolution + TypeInfo;
    type MaxVotesPerVoter;
    type MaxLength: Get<u32>;
    type MaxWeight: Get<Weight>;

    fn solution_weight(
        voters: u32,
        targets: u32,
        active_voters: u32,
        degree: u32
    ) -> Weight; }
Expand description

Configurations for a miner that comes with this pallet.

Required Associated Types§

The account id type.

The solution that the miner is mining.

Maximum number of votes per voter in the snapshots.

Maximum length of the solution that the miner is allowed to generate.

Solutions are trimmed to respect this.

Maximum weight of the solution that the miner is allowed to generate.

Solutions are trimmed to respect this.

The weight is computed using solution_weight.

Required Methods§

Something that can compute the weight of a solution.

This weight estimate is then used to trim the solution, based on MinerConfig::MaxWeight.

Implementors§