mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Remove Ord impl for Weights V2 and add comparison fns (#12183)
* Remove Ord impl for Weights V2 and add comparison fns * Remove TODO * Update frame/multisig/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/election-provider-multi-phase/src/unsigned.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove unused import * cargo fmt * Fix tests * Fix more tests * cargo fmt * Fix more tests * Update frame/contracts/src/wasm/mod.rs Co-authored-by: Alexander Theißen <alex.theissen@me.com> * Update weight benchmarking templates Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Alexander Theißen <alex.theissen@me.com>
This commit is contained in:
@@ -75,20 +75,20 @@ pub mod constants {
|
||||
fn bound() {
|
||||
// At least 1 µs.
|
||||
assert!(
|
||||
W::get().reads(1) >= constants::WEIGHT_PER_MICROS,
|
||||
W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(),
|
||||
"Read weight should be at least 1 µs."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1) >= constants::WEIGHT_PER_MICROS,
|
||||
W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(),
|
||||
"Write weight should be at least 1 µs."
|
||||
);
|
||||
// At most 1 ms.
|
||||
assert!(
|
||||
W::get().reads(1) <= constants::WEIGHT_PER_MILLIS,
|
||||
W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(),
|
||||
"Read weight should be at most 1 ms."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1) <= constants::WEIGHT_PER_MILLIS,
|
||||
W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(),
|
||||
"Write weight should be at most 1 ms."
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user