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:
Gavin Wood
2021-02-27 16:11:27 +01:00
committed by GitHub
parent 65df4a9333
commit ed365da8b9
14 changed files with 1626 additions and 2 deletions
@@ -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.
///