mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
Clean Phragmén Equlise API (#5452)
* Clean phragmen API and equalise() * Stabilize new api * Fix phragmen fuzzers * More fixes * Make fuzzers reproducible * improvements * Make equalize update assignments as well. * total function for staked_assignment. * Fix fuzzer build * remvoe TODO * Fix a bunch more. * clean stray debug stuff * Update primitives/phragmen/src/lib.rs Co-Authored-By: thiolliere <gui.thiolliere@gmail.com> * fix range function * fix number generator Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -167,7 +167,7 @@ pub fn prepare_submission<T: Trait>(
|
||||
// convert into absolute value and to obtain the reduced version.
|
||||
let mut staked = sp_phragmen::assignment_ratio_to_staked(
|
||||
assignments,
|
||||
<Module<T>>::slashable_balance_of_extended,
|
||||
<Module<T>>::slashable_balance_of_vote_weight,
|
||||
);
|
||||
|
||||
if do_reduce {
|
||||
@@ -188,7 +188,7 @@ pub fn prepare_submission<T: Trait>(
|
||||
let score = {
|
||||
let staked = sp_phragmen::assignment_ratio_to_staked(
|
||||
low_accuracy_assignment.clone(),
|
||||
<Module<T>>::slashable_balance_of_extended,
|
||||
<Module<T>>::slashable_balance_of_vote_weight,
|
||||
);
|
||||
|
||||
let (support_map, _) = build_support_map::<T::AccountId>(&winners, &staked);
|
||||
|
||||
Reference in New Issue
Block a user