npos-config 0.0.3

npos config
Documentation
use super::*;

generate_solution_type!(
  #[compact]
  pub struct NposSolution24::<
    VoterIndex = u32,
    TargetIndex = u16,
    Accuracy = PerU16,
    MaxVoters = ConstU32::<12500>
  >(24)
);

#[derive(Debug)]
pub struct MinerConfig;
impl pallet_election_provider_multi_phase::unsigned::MinerConfig
  for MinerConfig
{
  type AccountId = AccountId;
  type MaxLength = ConstU32<{ 5 * 1024 * 1024 }>;
  type MaxWeight = ();
  type MaxVotesPerVoter = ConstU32<24>;
  type Solution = NposSolution24;
  type MaxWinners = ConstU32<20000>;

  fn solution_weight(
    _voters: u32,
    _targets: u32,
    _active_voters: u32,
    _desired_targets: u32,
  ) -> Weight {
    Default::default()
  }
}