mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Gilts Pallet (#8139)
* Initial draft * Enlarge function drafted. * Thaw draft * Retract_bid draft * Final bits of draft impl. * Test mockup * Tests * Docs * Add benchmark scaffold * Integrate weights * All benchmarks done * Missing file * Remove stale comments * Fixes * Fixes * Allow for priority queuing. * Another test and a fix * Fixes * Fixes * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_gilt --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/gilt/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Grumble * Update frame/gilt/src/tests.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/gilt/src/tests.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Grumble * Update frame/gilt/src/tests.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/gilt/src/lib.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/gilt/src/lib.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Fix unreserve ordering * Grumble * Fixes Co-authored-by: Parity Benchmarking Bot <admin@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -80,6 +80,11 @@ pub trait PerThing:
|
||||
Self::from_rational_approximation::<Self::Upper>(p * p, q * q)
|
||||
}
|
||||
|
||||
/// Return the part left when `self` is saturating-subtracted from `Self::one()`.
|
||||
fn left_from_one(self) -> Self {
|
||||
Self::one().saturating_sub(self)
|
||||
}
|
||||
|
||||
/// Multiplication that always rounds down to a whole number. The standard `Mul` rounds to the
|
||||
/// nearest whole number.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user