mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +00:00
Remove RefTimeWeight (#12157)
* 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 * remove RefTimeWeight * Update frame/contracts/src/storage.rs Co-authored-by: Alexander Theißen <alex.theissen@me.com> * not needed * Fixes Co-authored-by: Alexander Theißen <alex.theissen@me.com> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight, constants::RocksDbWeight}};
|
||||
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions needed for pallet_bags_list.
|
||||
@@ -57,18 +57,18 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: BagsList ListNodes (r:4 w:4)
|
||||
// Storage: BagsList ListBags (r:1 w:1)
|
||||
fn rebag_non_terminal() -> Weight {
|
||||
Weight::from_ref_time(55_040_000 as RefTimeWeight)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
|
||||
Weight::from_ref_time(55_040_000 as u64)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as u64))
|
||||
}
|
||||
// Storage: Staking Bonded (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: BagsList ListNodes (r:3 w:3)
|
||||
// Storage: BagsList ListBags (r:2 w:2)
|
||||
fn rebag_terminal() -> Weight {
|
||||
Weight::from_ref_time(53_671_000 as RefTimeWeight)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
|
||||
Weight::from_ref_time(53_671_000 as u64)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as u64))
|
||||
}
|
||||
// Storage: BagsList ListNodes (r:4 w:4)
|
||||
// Storage: Staking Bonded (r:2 w:0)
|
||||
@@ -76,9 +76,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: BagsList CounterForListNodes (r:1 w:1)
|
||||
// Storage: BagsList ListBags (r:1 w:1)
|
||||
fn put_in_front_of() -> Weight {
|
||||
Weight::from_ref_time(56_410_000 as RefTimeWeight)
|
||||
.saturating_add(T::DbWeight::get().reads(10 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(6 as RefTimeWeight))
|
||||
Weight::from_ref_time(56_410_000 as u64)
|
||||
.saturating_add(T::DbWeight::get().reads(10 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(6 as u64))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,18 +89,18 @@ impl WeightInfo for () {
|
||||
// Storage: BagsList ListNodes (r:4 w:4)
|
||||
// Storage: BagsList ListBags (r:1 w:1)
|
||||
fn rebag_non_terminal() -> Weight {
|
||||
Weight::from_ref_time(55_040_000 as RefTimeWeight)
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as RefTimeWeight))
|
||||
Weight::from_ref_time(55_040_000 as u64)
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as u64))
|
||||
}
|
||||
// Storage: Staking Bonded (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: BagsList ListNodes (r:3 w:3)
|
||||
// Storage: BagsList ListBags (r:2 w:2)
|
||||
fn rebag_terminal() -> Weight {
|
||||
Weight::from_ref_time(53_671_000 as RefTimeWeight)
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as RefTimeWeight))
|
||||
Weight::from_ref_time(53_671_000 as u64)
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as u64))
|
||||
}
|
||||
// Storage: BagsList ListNodes (r:4 w:4)
|
||||
// Storage: Staking Bonded (r:2 w:0)
|
||||
@@ -108,8 +108,8 @@ impl WeightInfo for () {
|
||||
// Storage: BagsList CounterForListNodes (r:1 w:1)
|
||||
// Storage: BagsList ListBags (r:1 w:1)
|
||||
fn put_in_front_of() -> Weight {
|
||||
Weight::from_ref_time(56_410_000 as RefTimeWeight)
|
||||
.saturating_add(RocksDbWeight::get().reads(10 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(6 as RefTimeWeight))
|
||||
Weight::from_ref_time(56_410_000 as u64)
|
||||
.saturating_add(RocksDbWeight::get().reads(10 as u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(6 as u64))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user