mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 01:51:02 +00:00
srml-module: Phragmen election (#3364)
* phragmen election module. * Add new files. * Some doc update * Update weights. * bump and a few nits. * Performance improvement. * Master.into() * Update srml/elections-phragmen/src/lib.rs Co-Authored-By: Gavin Wood <gavin@parity.io> * Fix build * Some fixes. * Fix build. * Proper outgoing and runner-up managment. * Bit more sensical weight values. * Update srml/elections-phragmen/src/lib.rs * Update srml/elections-phragmen/src/lib.rs Co-Authored-By: Gavin Wood <gavin@parity.io> * Update srml/elections-phragmen/src/lib.rs Co-Authored-By: Gavin Wood <gavin@parity.io> * Update srml/elections-phragmen/src/lib.rs Co-Authored-By: Gavin Wood <gavin@parity.io> * fix lock file * Fix build. * Remove runner-ups * Some refactors. * Add support for reporting voters. * Fix member check. * Remove equlize.rs * Update srml/elections-phragmen/src/lib.rs * Update srml/elections-phragmen/src/lib.rs * Update srml/elections-phragmen/src/lib.rs Co-Authored-By: Gavin Wood <gavin@parity.io> * Update srml/elections-phragmen/src/lib.rs Co-Authored-By: Gavin Wood <gavin@parity.io> * Bring back runner ups. * use decode_len * Better weight values. * Update bogus doc * Bump. * Update srml/elections-phragmen/src/lib.rs Co-Authored-By: Gavin Wood <gavin@parity.io> * Review comments. * One more test * Fix tests * Fix build * .. and fix benchmarks. * Update srml/elections-phragmen/src/lib.rs * Version bump
This commit is contained in:
@@ -35,7 +35,7 @@ fn float_phragmen_poc_works() {
|
||||
let winners = phragmen_result.clone().winners;
|
||||
let assignments = phragmen_result.clone().assignments;
|
||||
|
||||
assert_eq_uvec!(winners, vec![2, 3]);
|
||||
assert_eq_uvec!(winners, vec![(2, 40), (3, 50)]);
|
||||
assert_eq_uvec!(
|
||||
assignments,
|
||||
vec![
|
||||
@@ -86,7 +86,7 @@ fn phragmen_poc_works() {
|
||||
false,
|
||||
).unwrap();
|
||||
|
||||
assert_eq_uvec!(winners, vec![2, 3]);
|
||||
assert_eq_uvec!(winners, vec![(2, 40), (3, 50)]);
|
||||
assert_eq_uvec!(
|
||||
assignments,
|
||||
vec![
|
||||
|
||||
Reference in New Issue
Block a user