Companion for paritytech/substrate#12183 (#5971)

* Companion for paritytech/substrate#12183

* Fixes

* Fixes

* Fixes

* cargo fmt

* Fixes

* Fixes

* Fixes

* cargo fmt

* Update runtime/parachains/src/paras_inherent/mod.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* update lockfile for {"substrate"}

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
This commit is contained in:
Keith Yeung
2022-09-08 13:05:03 +08:00
committed by GitHub
parent c594a0ca51
commit ef3b001b4e
30 changed files with 327 additions and 279 deletions
+5 -7
View File
@@ -24,7 +24,7 @@ fn remove_keys_weight_is_sensible() {
use runtime_common::crowdloan::WeightInfo;
let max_weight = <Runtime as crowdloan::Config>::WeightInfo::refund(RemoveKeysLimit::get());
// Max remove keys limit should be no more than half the total block weight.
assert!(max_weight * 2 < BlockWeights::get().max_block);
assert!((max_weight * 2).all_lt(BlockWeights::get().max_block));
}
#[test]
@@ -35,11 +35,9 @@ fn sample_size_is_sensible() {
let max_weight: frame_support::weights::Weight =
RocksDbWeight::get().reads_writes(samples.into(), samples.into());
// Max sample cleanup should be no more than half the total block weight.
assert!(max_weight * 2 < BlockWeights::get().max_block);
assert!(
<Runtime as auctions::Config>::WeightInfo::on_initialize() * 2 <
BlockWeights::get().max_block
);
assert!((max_weight * 2).all_lt(BlockWeights::get().max_block));
assert!((<Runtime as auctions::Config>::WeightInfo::on_initialize() * 2)
.all_lt(BlockWeights::get().max_block));
}
#[test]
@@ -67,5 +65,5 @@ fn sanity_check_teleport_assets_weight() {
.get_dispatch_info()
.weight;
assert!(weight * 50 < BlockWeights::get().max_block);
assert!((weight * 50).all_lt(BlockWeights::get().max_block));
}