mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
Decouple Stkaing and Election - Part1: Support traits (#7908)
* Base features and traits. * Fix the build * Remove unused boxing * Self review cleanup * Fix build
This commit is contained in:
@@ -30,7 +30,7 @@ use sp_npos_elections::{ElectionResult, VoteWeight};
|
||||
use std::collections::BTreeMap;
|
||||
use sp_runtime::{Perbill, PerThing, traits::Zero};
|
||||
use sp_npos_elections::{
|
||||
balance_solution, assignment_ratio_to_staked, build_support_map, to_without_backing, VoteWeight,
|
||||
balance_solution, assignment_ratio_to_staked, to_support_map, to_without_backing, VoteWeight,
|
||||
ExtendedBalance, Assignment, StakedAssignment, IdentifierT, assignment_ratio_to_staked,
|
||||
seq_phragmen,
|
||||
};
|
||||
@@ -149,7 +149,7 @@ fn do_phragmen(
|
||||
if eq_iters > 0 {
|
||||
let staked = assignment_ratio_to_staked(assignments, &stake_of);
|
||||
let winners = to_without_backing(winners);
|
||||
let mut support = build_support_map(
|
||||
let mut support = to_support_map(
|
||||
winners.as_ref(),
|
||||
staked.as_ref(),
|
||||
).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user