mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 02:51:08 +00:00
Weight v1.5 Follow Ups (#12155)
* update api * update * remove unused * remove `one` api * fix unused * fmt * add saturating accrue * remove `Weight::new()` * use some macros * div makes no sense * Update weight_v2.rs * missed some * more patch * fixes * more fixes * more fix * more fix * Update frame/support/src/weights/weight_v2.rs * not needed * fix weight file
This commit is contained in:
@@ -26,7 +26,7 @@ use sp_std::{marker::PhantomData, prelude::*};
|
||||
/// Wrapper for all migrations of this pallet, based on `StorageVersion`.
|
||||
pub fn migrate<T: Config>() -> Weight {
|
||||
let version = StorageVersion::get::<Pallet<T>>();
|
||||
let mut weight = Weight::new();
|
||||
let mut weight = Weight::zero();
|
||||
|
||||
if version < 4 {
|
||||
weight = weight.saturating_add(v4::migrate::<T>());
|
||||
@@ -127,7 +127,7 @@ mod v5 {
|
||||
type DeletionQueue<T: Config> = StorageValue<Pallet<T>, Vec<DeletedContract>>;
|
||||
|
||||
pub fn migrate<T: Config>() -> Weight {
|
||||
let mut weight = Weight::new();
|
||||
let mut weight = Weight::zero();
|
||||
|
||||
<ContractInfoOf<T>>::translate(|_key, old: OldContractInfo<T>| {
|
||||
weight = weight.saturating_add(T::DbWeight::get().reads_writes(1, 1));
|
||||
@@ -216,7 +216,7 @@ mod v6 {
|
||||
type OwnerInfoOf<T: Config> = StorageMap<Pallet<T>, Identity, CodeHash<T>, OwnerInfo<T>>;
|
||||
|
||||
pub fn migrate<T: Config>() -> Weight {
|
||||
let mut weight = Weight::new();
|
||||
let mut weight = Weight::zero();
|
||||
|
||||
<ContractInfoOf<T>>::translate(|_key, old: OldContractInfo<T>| {
|
||||
weight = weight.saturating_add(T::DbWeight::get().reads_writes(1, 1));
|
||||
|
||||
Reference in New Issue
Block a user