mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-19 23:55:40 +00:00
Refactor: fixed point arithmetic for SRML. (#3456)
* Macro-ify perthings. * Refactor fixed64 * Half-workign phragmen refactor. * Finalize phragmen refactor. * Fix creation of perquintill * Fix build errors * Line-width * Fix more build errors. * Line-width * Fix offence test * Resolve all TODOs. * Apply suggestions from code review Co-Authored-By: Gavin Wood <gavin@parity.io> Co-Authored-By: thiolliere <gui.thiolliere@gmail.com> * Fix most of the review comments. * Updates to multiply by rational * Fxi build * Fix abs issue with Fixed64 * Fix tests and improvements. * Fix build * Remove more tests from staking. * Review comments. * Add fuzzing stuff. * Better fuzzing * Better doc. * Bump. * Master.into() * A bit more hardening. * Final nits. * Update lock * Fix indent. * Revert lock file. * Bump.
This commit is contained in:
@@ -151,7 +151,7 @@ parameter_types! {
|
||||
pub const Period: BlockNumber = 1;
|
||||
pub const Offset: BlockNumber = 0;
|
||||
pub const UncleGenerations: u64 = 0;
|
||||
pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(33);
|
||||
pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(25);
|
||||
}
|
||||
impl session::Trait for Test {
|
||||
type OnSessionEnding = session::historical::NoteHistoricalRoot<Test, Staking>;
|
||||
@@ -396,7 +396,7 @@ pub fn check_nominator_exposure(stash: u64) {
|
||||
|
||||
pub fn assert_total_expo(stash: u64, val: u64) {
|
||||
let expo = Staking::stakers(&stash);
|
||||
assert_eq!(expo.total, val);
|
||||
assert_eq!(expo.total, val, "total exposure mismatch {:?} != {:?}", expo.total, val);
|
||||
}
|
||||
|
||||
pub fn assert_is_stash(acc: u64) {
|
||||
|
||||
Reference in New Issue
Block a user