mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 16:21:02 +00:00
Use proper bounded vector type for nominations (#10601)
* Use proper bounded vector type for nominations * add docs and tweak chill_other for cleanup purposes * Fix the build * remove TODO * add a bit more doc * even more docs gushc * Update frame/staking/src/pallet/mod.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Update frame/staking/src/pallet/mod.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Fix the nasty bug * also bound the Snapshot type * fix doc test * document bounded_vec * self-review * remove unused * Fix build * frame-support: repetition overload for bounded_vec Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix * remove the need to allocate into unbounded voters etc etc * Don't expect * unbreal the build again * handle macro a bit better Co-authored-by: Zeke Mostov <z.mostov@gmail.com> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
@@ -926,13 +926,13 @@ impl<T: Config> Pallet<T> {
|
||||
let weight_candidates = candidates_and_deposit.len() as u32;
|
||||
let weight_voters = voters_and_votes.len() as u32;
|
||||
let weight_edges = num_edges;
|
||||
let _ = sp_npos_elections::seq_phragmen::<T::AccountId, Perbill>(
|
||||
let _ = sp_npos_elections::seq_phragmen(
|
||||
num_to_elect,
|
||||
candidate_ids,
|
||||
voters_and_votes.clone(),
|
||||
None,
|
||||
)
|
||||
.map(|ElectionResult { winners, assignments: _ }| {
|
||||
.map(|ElectionResult::<T::AccountId, Perbill> { winners, assignments: _ }| {
|
||||
// this is already sorted by id.
|
||||
let old_members_ids_sorted =
|
||||
<Members<T>>::take().into_iter().map(|m| m.who).collect::<Vec<T::AccountId>>();
|
||||
|
||||
Reference in New Issue
Block a user