mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Custom Codec Implenetation for NPoS Election (#6720)
* Fancy compact encode/decode impl for compact solution * Make it optional * Remove extra file * Update primitives/npos-elections/compact/src/lib.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> * Final fixes. Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -118,6 +118,5 @@ fn assert_per_thing_equal_error<P: PerThing>(a: P, b: P, err: u128) {
|
||||
let a_abs = a.deconstruct().saturated_into::<u128>();
|
||||
let b_abs = b.deconstruct().saturated_into::<u128>();
|
||||
let diff = a_abs.max(b_abs) - a_abs.min(b_abs);
|
||||
dbg!(&diff);
|
||||
assert!(diff <= err, "{:?} !~ {:?}", a, b);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user