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
@@ -23,7 +23,7 @@ pub mod constants {
parameter_types! {
/// Importing a block with 0 Extrinsics.
pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(5_000_000);
pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.saturating_mul(5_000_000);
}
#[cfg(test)]
@@ -38,9 +38,12 @@ pub mod constants {
let w = super::constants::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.");
}
}
}
@@ -23,7 +23,7 @@ pub mod constants {
parameter_types! {
/// Executing a NO-OP `System::remarks` Extrinsic.
pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(125_000);
pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.saturating_mul(125_000);
}
#[cfg(test)]
@@ -38,7 +38,7 @@ pub mod constants {
let w = super::constants::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.");
}