mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 02:51:08 +00:00
Fix Reduce Equalise order in offhchain phragmen (#5892)
This commit is contained in:
@@ -2338,6 +2338,9 @@ impl<T: Trait> Module<T> {
|
||||
// candidates.
|
||||
let snapshot_length = <SnapshotValidators<T>>::decode_len()
|
||||
.map_err(|_| Error::<T>::SnapshotUnavailable)?;
|
||||
|
||||
// check the winner length only here and when we know the length of the snapshot validators
|
||||
// length.
|
||||
let desired_winners = Self::validator_count().min(snapshot_length as u32);
|
||||
ensure!(winners.len() as u32 == desired_winners, Error::<T>::PhragmenBogusWinnerCount);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user