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
+2 -2
View File
@@ -404,7 +404,7 @@ pub mod pallet {
#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
fn on_initialize(_n: BlockNumberFor<T>) -> Weight {
let mut weight_used = Weight::new();
let mut weight_used = Weight::zero();
if let Some(migration) = CurrentMigration::<T>::get() {
// Consume 10% of block at most
let max_weight = T::BlockWeights::get().max_block / 10;
@@ -886,7 +886,7 @@ pub mod pallet {
mut stage: VersionMigrationStage,
weight_cutoff: Weight,
) -> (Weight, Option<VersionMigrationStage>) {
let mut weight_used = Weight::new();
let mut weight_used = Weight::zero();
// TODO: Correct weights for the components of this:
let todo_sv_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 1);