mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-16 16:41:10 +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_vesting.
|
||||
@@ -60,96 +60,96 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vest_locked(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(32_978_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(32_978_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(82_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(82_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(88_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(88_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vest_unlocked(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(32_856_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(32_856_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(79_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(79_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(56_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn vest_other_locked(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(33_522_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(33_522_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(74_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(74_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(72_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(72_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn vest_other_unlocked(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(32_558_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(32_558_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(78_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(78_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(61_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(61_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vested_transfer(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(49_260_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(49_260_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(80_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 3_000
|
||||
.saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(55_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn force_vested_transfer(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(49_166_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(49_166_000 as u64)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(77_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(77_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 4_000
|
||||
.saturating_add(Weight::from_ref_time(43_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(43_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(34_042_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(34_042_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(83_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(83_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(80_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(33_937_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(33_937_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(78_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(78_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(73_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(73_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as u64))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,95 +158,95 @@ impl WeightInfo for () {
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vest_locked(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(32_978_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(32_978_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(82_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(82_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(88_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(88_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vest_unlocked(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(32_856_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(32_856_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(79_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(79_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(56_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn vest_other_locked(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(33_522_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(33_522_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(74_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(74_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(72_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(72_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn vest_other_unlocked(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(32_558_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(32_558_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(78_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(78_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(61_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(61_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vested_transfer(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(49_260_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(49_260_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(80_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 3_000
|
||||
.saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(55_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn force_vested_transfer(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(49_166_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(49_166_000 as u64)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(77_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(77_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 4_000
|
||||
.saturating_add(Weight::from_ref_time(43_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(43_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(34_042_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(34_042_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(83_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(83_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(80_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as u64))
|
||||
}
|
||||
// Storage: Vesting Vesting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
|
||||
Weight::from_ref_time(33_937_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(33_937_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(78_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(78_000 as u64).saturating_mul(l as u64))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(73_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(73_000 as u64).saturating_mul(s as u64))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as u64))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user