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:
Keith Yeung
2022-09-08 12:22:41 +08:00
committed by GitHub
parent 09ec484139
commit 6ce4d45175
23 changed files with 156 additions and 82 deletions
+2 -2
View File
@@ -823,7 +823,7 @@ fn report_equivocation_has_valid_weight() {
.map(<Test as Config>::WeightInfo::report_equivocation)
.collect::<Vec<_>>()
.windows(2)
.all(|w| w[0] < w[1]));
.all(|w| w[0].ref_time() < w[1].ref_time()));
}
#[test]
@@ -852,7 +852,7 @@ fn valid_equivocation_reports_dont_pay_fees() {
.get_dispatch_info();
// it should have non-zero weight and the fee has to be paid.
assert!(info.weight > Weight::zero());
assert!(info.weight.all_gt(Weight::zero()));
assert_eq!(info.pays_fee, Pays::Yes);
// report the equivocation.