mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 12:17:58 +00:00
Multi-Block Election part 0: preparation and some cleanup. (#9442)
* Partially applied * Everything builds, need to implement compact encoding as well. * Fix some tests, add a ui test as well. * Fix everything and everything. * small nits * a bunch more rename * more reorg * more reorg * last nit of self-review * Seemingly fixed the build now * Fix build * make it work again * Update primitives/npos-elections/solution-type/src/lib.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> * Update primitives/npos-elections/solution-type/src/lib.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> * nits * factor out double type * fix try-build Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -548,15 +548,14 @@ parameter_types! {
|
||||
|
||||
sp_npos_elections::generate_solution_type!(
|
||||
#[compact]
|
||||
pub struct NposCompactSolution16::<
|
||||
pub struct NposSolution16::<
|
||||
VoterIndex = u32,
|
||||
TargetIndex = u16,
|
||||
Accuracy = sp_runtime::PerU16,
|
||||
>(16)
|
||||
);
|
||||
|
||||
pub const MAX_NOMINATIONS: u32 =
|
||||
<NposCompactSolution16 as sp_npos_elections::CompactSolution>::LIMIT as u32;
|
||||
pub const MAX_NOMINATIONS: u32 = <NposSolution16 as sp_npos_elections::NposSolution>::LIMIT as u32;
|
||||
|
||||
/// The numbers configured here should always be more than the the maximum limits of staking pallet
|
||||
/// to ensure election snapshot will not run out of memory.
|
||||
@@ -593,7 +592,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
|
||||
type RewardHandler = (); // nothing to do upon rewards
|
||||
type DataProvider = Staking;
|
||||
type OnChainAccuracy = Perbill;
|
||||
type CompactSolution = NposCompactSolution16;
|
||||
type Solution = NposSolution16;
|
||||
type Fallback = Fallback;
|
||||
type WeightInfo = pallet_election_provider_multi_phase::weights::SubstrateWeight<Runtime>;
|
||||
type ForceOrigin = EnsureRootOrHalfCouncil;
|
||||
|
||||
Reference in New Issue
Block a user