Companion for Weight v1.5 Follow Up (#5949)

* updates

* remove new

* fix up some stuff

* fix cargo files

* fix

* fix template

* update lockfile for {"substrate"}

* Update block_weights.rs

* remove unused

* remove unused

Co-authored-by: parity-processbot <>
This commit is contained in:
Shawn Tabrizi
2022-09-01 20:00:51 +01:00
committed by GitHub
parent 75d49dfeb4
commit e28bf2e476
128 changed files with 969 additions and 968 deletions
@@ -54,7 +54,7 @@ parameter_types! {
/// 99th: 4_189_094
/// 95th: 4_152_261
/// 75th: 4_098_529
pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.scalar_saturating_mul(4_084_738);
pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(4_084_738);
}
#[cfg(test)]
@@ -69,8 +69,8 @@ mod test_weights {
let w = super::BlockExecutionWeight::get();
// At least 100 µs.
assert!(w >= 100 * constants::WEIGHT_PER_MICROS, "Weight should be at least 100 µs.");
assert!(w >= 100u64 * constants::WEIGHT_PER_MICROS, "Weight should be at least 100 µs.");
// At most 50 ms.
assert!(w <= 50 * constants::WEIGHT_PER_MILLIS, "Weight should be at most 50 ms.");
assert!(w <= 50u64 * constants::WEIGHT_PER_MILLIS, "Weight should be at most 50 ms.");
}
}
@@ -53,7 +53,7 @@ parameter_types! {
/// 99th: 79_591
/// 95th: 78_730
/// 75th: 78_272
pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.scalar_saturating_mul(78_269);
pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(78_269);
}
#[cfg(test)]
@@ -68,7 +68,7 @@ mod test_weights {
let w = super::ExtrinsicBaseWeight::get();
// At least 10 µs.
assert!(w >= 10 * constants::WEIGHT_PER_MICROS, "Weight should be at least 10 µs.");
assert!(w >= 10u64 * constants::WEIGHT_PER_MICROS, "Weight should be at least 10 µs.");
// At most 1 ms.
assert!(w <= constants::WEIGHT_PER_MILLIS, "Weight should be at most 1 ms.");
}