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

* fixes

* oopsie

* [ci] Apply cargo-fmt

* fixes

* [ci] Apply cargo-fmt

* fixes

* fix cumulus template

* fix merge

* update lockfile for {"polkadot", "substrate"}

Co-authored-by: paritytech-ci <paritytech-ci@parity.io>
Co-authored-by: parity-processbot <>
This commit is contained in:
Shawn Tabrizi
2022-09-01 20:25:05 +01:00
committed by GitHub
parent 8765c22840
commit 2c1e88522c
66 changed files with 583 additions and 565 deletions
+2 -2
View File
@@ -269,7 +269,7 @@ pub mod pallet {
}
fn on_initialize(_n: T::BlockNumber) -> Weight {
let mut weight = Weight::new();
let mut weight = Weight::zero();
// To prevent removing `NewValidationCode` that was set by another `on_initialize`
// like for example from scheduler, we only kill the storage entry if it was not yet
@@ -808,7 +808,7 @@ impl<T: Config> Pallet<T> {
let dm_count = downward_messages.len() as u32;
let mut dmq_head = <LastDmqMqcHead<T>>::get();
let mut weight_used = Weight::new();
let mut weight_used = Weight::zero();
if dm_count != 0 {
Self::deposit_event(Event::DownwardMessagesReceived { count: dm_count });
let max_weight =
@@ -25,7 +25,7 @@ pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);
/// Call this during the next runtime upgrade for this module.
pub fn on_runtime_upgrade<T: Config>() -> Weight {
let mut weight: Weight = Weight::new();
let mut weight: Weight = Weight::zero();
if StorageVersion::get::<Pallet<T>>() == 0 {
weight = weight