pub use frame_election_provider_support::NposSolver; pub use frame_election_provider_support::VoteWeight; pub use frame_election_provider_support::Voter; pub use frame_election_provider_support::{PhragMMS, SequentialPhragmen}; // pub use frame_support::{traits::ConstU32, weights::Weight}; pub use pallet_election_provider_multi_phase::RoundSnapshot; pub use pallet_election_provider_multi_phase::{ ElectionCompute, Miner, MinerConfig, RawSolution, ReadySolution, SolutionOf, }; pub use parity_scale_codec::*; // pub use sp_core::bounded_vec::BoundedVec; pub use bounded_collections::BoundedVec; pub use sp_npos_elections::{BalancingConfig, ElectionScore}; // pub use frame_election_provider_solution_type::generate_solution_type; pub use frame_election_provider_support::generate_solution_type; // pub use arithmetic::per_things::PerU16; pub use sp_runtime::PerU16; /// The account id type. pub type AccountId = sp_runtime::AccountId32; /// The accuracy that we use for election computation. pub type Accuracy = sp_runtime::Perbill; pub type SeqSolver = SequentialPhragmen<::AccountId, Accuracy, Balancing>; pub type MmsSolver = PhragMMS<::AccountId, Accuracy, Balancing>; frame_support::parameter_types! { /// Number of balancing iterations for a solution algorithm. Set based on the [`Solvers`] CLI /// config. pub static BalanceIterations: usize = 10; pub static Tolerance: u128 = 0; pub static Balancing: Option = Some( BalancingConfig { iterations: BalanceIterations::get(), tolerance: Tolerance::get(), } ); }