mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 03:01:07 +00:00
New weights using i7 machine (#5848)
* i7 weights * fix full block test * fix merge * fix priority
This commit is contained in:
@@ -431,9 +431,12 @@ decl_module! {
|
||||
/// - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`.
|
||||
/// - `transfer_keep_alive` works the same way as `transfer`, but has an additional
|
||||
/// check that the transfer will not kill the origin account.
|
||||
///
|
||||
/// ---------------------------------
|
||||
/// - Base Weight: 80 µs, worst case scenario (account created, account removed)
|
||||
/// - DB Weight: 1 Read and 1 Write to destination account
|
||||
/// - Origin account is already in memory, so no DB operations for them.
|
||||
/// # </weight>
|
||||
#[weight = T::DbWeight::get().reads_writes(1, 1) + 200_000_000]
|
||||
#[weight = T::DbWeight::get().reads_writes(1, 1) + 80_000_000]
|
||||
pub fn transfer(
|
||||
origin,
|
||||
dest: <T::Lookup as StaticLookup>::Source,
|
||||
@@ -456,8 +459,11 @@ decl_module! {
|
||||
/// # <weight>
|
||||
/// - Independent of the arguments.
|
||||
/// - Contains a limited number of reads and writes.
|
||||
/// ---------------------
|
||||
/// - Base Weight: 32.6 µs
|
||||
/// - DB Weight: 1 Read, 1 Write to `who`
|
||||
/// # </weight>
|
||||
#[weight = T::DbWeight::get().reads_writes(1, 1) + 100_000_000]
|
||||
#[weight = T::DbWeight::get().reads_writes(1, 1) + 35_000_000]
|
||||
fn set_balance(
|
||||
origin,
|
||||
who: <T::Lookup as StaticLookup>::Source,
|
||||
@@ -499,7 +505,7 @@ decl_module! {
|
||||
/// - Same as transfer, but additional read and write because the source account is
|
||||
/// not assumed to be in the overlay.
|
||||
/// # </weight>
|
||||
#[weight = T::DbWeight::get().reads_writes(2, 2) + 200_000_000]
|
||||
#[weight = T::DbWeight::get().reads_writes(2, 2) + 80_000_000]
|
||||
pub fn force_transfer(
|
||||
origin,
|
||||
source: <T::Lookup as StaticLookup>::Source,
|
||||
@@ -518,7 +524,12 @@ decl_module! {
|
||||
/// 99% of the time you want [`transfer`] instead.
|
||||
///
|
||||
/// [`transfer`]: struct.Module.html#method.transfer
|
||||
#[weight = T::DbWeight::get().reads_writes(1, 1) + 150_000_000]
|
||||
/// # <weight>
|
||||
/// - Cheaper than transfer because account cannot be killed.
|
||||
/// - Base Weight: 57.36 µs
|
||||
/// - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already)
|
||||
/// #</weight>
|
||||
#[weight = T::DbWeight::get().reads_writes(1, 1) + 60_000_000]
|
||||
pub fn transfer_keep_alive(
|
||||
origin,
|
||||
dest: <T::Lookup as StaticLookup>::Source,
|
||||
|
||||
Reference in New Issue
Block a user