chore: regenerate umbrella crate, fix feature propagation
This commit is contained in:
@@ -20,9 +20,9 @@
|
||||
// Each function will be used based on which fuzzer binary is being used.
|
||||
#![allow(dead_code)]
|
||||
|
||||
use rand::{self, seq::SliceRandom, Rng, RngCore};
|
||||
use pezsp_npos_elections::{phragmms, seq_phragmen, BalancingConfig, ElectionResult, VoteWeight};
|
||||
use pezsp_runtime::Perbill;
|
||||
use rand::{self, seq::SliceRandom, Rng, RngCore};
|
||||
use std::collections::{BTreeMap, HashSet};
|
||||
|
||||
/// converts x into the range [a, b] in a pseudo-fair way.
|
||||
|
||||
@@ -21,11 +21,11 @@ mod common;
|
||||
|
||||
use common::*;
|
||||
use honggfuzz::fuzz;
|
||||
use rand::{self, SeedableRng};
|
||||
use pezsp_npos_elections::{
|
||||
assignment_ratio_to_staked_normalized, seq_phragmen, to_supports, BalancingConfig,
|
||||
ElectionResult, EvaluateSupport, VoteWeight,
|
||||
};
|
||||
use rand::{self, SeedableRng};
|
||||
|
||||
fn main() {
|
||||
loop {
|
||||
|
||||
@@ -46,8 +46,8 @@ use clap::Parser;
|
||||
|
||||
mod common;
|
||||
use common::{generate_random_npos_inputs, to_range};
|
||||
use rand::{self, SeedableRng};
|
||||
use pezsp_npos_elections::{pjr_check_core, seq_phragmen_core, setup_inputs, standard_threshold};
|
||||
use rand::{self, SeedableRng};
|
||||
|
||||
type AccountId = u64;
|
||||
|
||||
|
||||
@@ -21,12 +21,12 @@ mod common;
|
||||
|
||||
use common::*;
|
||||
use honggfuzz::fuzz;
|
||||
use rand::{self, SeedableRng};
|
||||
use pezsp_npos_elections::{
|
||||
assignment_ratio_to_staked_normalized, phragmms, to_supports, BalancingConfig, ElectionResult,
|
||||
EvaluateSupport, VoteWeight,
|
||||
};
|
||||
use pezsp_runtime::Perbill;
|
||||
use rand::{self, SeedableRng};
|
||||
|
||||
fn main() {
|
||||
loop {
|
||||
|
||||
@@ -34,8 +34,8 @@ use honggfuzz::fuzz;
|
||||
|
||||
mod common;
|
||||
use common::to_range;
|
||||
use rand::{self, Rng, RngCore, SeedableRng};
|
||||
use pezsp_npos_elections::{reduce, to_support_map, ExtendedBalance, StakedAssignment};
|
||||
use rand::{self, Rng, RngCore, SeedableRng};
|
||||
|
||||
type Balance = u128;
|
||||
type AccountId = u64;
|
||||
|
||||
@@ -79,11 +79,11 @@ extern crate alloc;
|
||||
use alloc::{collections::btree_map::BTreeMap, rc::Rc, vec, vec::Vec};
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
|
||||
use core::{cell::RefCell, cmp::Ordering};
|
||||
use pezsp_arithmetic::{traits::Zero, Normalizable, PerThing, Rational128, ThresholdOrd};
|
||||
use pezsp_core::RuntimeDebug;
|
||||
use scale_info::TypeInfo;
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
use pezsp_arithmetic::{traits::Zero, Normalizable, PerThing, Rational128, ThresholdOrd};
|
||||
use pezsp_core::RuntimeDebug;
|
||||
|
||||
#[cfg(test)]
|
||||
mod mock;
|
||||
@@ -481,8 +481,8 @@ pub struct ElectionResult<AccountId, P: PerThing> {
|
||||
///
|
||||
/// This complements the [`ElectionResult`] and is needed to run the balancing post-processing.
|
||||
///
|
||||
/// This, at the current version, resembles the `Exposure` defined in the Staking pezpallet, yet they
|
||||
/// do not necessarily have to be the same.
|
||||
/// This, at the current version, resembles the `Exposure` defined in the Staking pezpallet, yet
|
||||
/// they do not necessarily have to be the same.
|
||||
#[derive(RuntimeDebug, Encode, Decode, DecodeWithMemTracking, Clone, Eq, PartialEq, TypeInfo)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
pub struct Support<AccountId> {
|
||||
|
||||
@@ -21,8 +21,8 @@ use crate::{
|
||||
balancing, helpers::*, mock::*, seq_phragmen, seq_phragmen_core, setup_inputs, to_support_map,
|
||||
Assignment, BalancingConfig, ElectionResult, ExtendedBalance, StakedAssignment, Support, Voter,
|
||||
};
|
||||
use pezsp_arithmetic::{PerU16, Perbill, Percent, Permill};
|
||||
use bizinikiwi_test_utils::assert_eq_uvec;
|
||||
use pezsp_arithmetic::{PerU16, Perbill, Percent, Permill};
|
||||
|
||||
#[test]
|
||||
fn float_phragmen_poc_works() {
|
||||
|
||||
Reference in New Issue
Block a user