mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 01:07:57 +00:00
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:
@@ -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.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user