Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update util
  • Loading branch information
shawntabrizi committed May 4, 2020
commit b74fd62ed111cb0122f6597fe6e53260b4ff0679
28 changes: 14 additions & 14 deletions frame/utility/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,16 @@ mod weight_of {
use super::*;

/// - Base Weight:
/// - Create: 59.2 + 0.096 * S µs
/// - Approve: 42.27 + .116 * S µs
/// - Complete: 50.91 + .232 * S µs
/// - Create: 46.55 + 0.089 * S µs
/// - Approve: 34.03 + .112 * S µs
/// - Complete: 40.36 + .225 * S µs
/// - DB Weight:
/// - Reads: Multisig Storage, [Caller Account]
/// - Writes: Multisig Storage, [Caller Account]
/// - Plus Call Weight
pub fn as_multi<T: Trait>(other_sig_len: usize, call_weight: Weight) -> Weight {
call_weight
.saturating_add(60_000_000)
.saturating_add(45_000_000)
.saturating_add((other_sig_len as Weight).saturating_mul(250_000))
.saturating_add(T::DbWeight::get().reads_writes(1, 1))
}
Expand All @@ -236,7 +236,7 @@ decl_module! {
/// - `calls`: The calls to be dispatched from the same origin.
///
/// # <weight>
/// - Base weight: 15.64 + .987 * c µs
/// - Base weight: 14.39 + .987 * c µs
/// - Plus the sum of the weights of the `calls`.
/// - Plus one additional event. (repeat read/write)
/// # </weight>
Expand Down Expand Up @@ -280,7 +280,7 @@ decl_module! {
/// The dispatch origin for this call must be _Signed_.
///
/// # <weight>
/// - Base weight: 2.863 µs
/// - Base weight: 2.861 µs
/// - Plus the weight of the `call`
/// # </weight>
#[weight = FunctionOf(
Expand Down Expand Up @@ -339,9 +339,9 @@ decl_module! {
/// `MultisigDepositBase + threshold * MultisigDepositFactor`.
/// -------------------------------
/// - Base Weight:
/// - Create: 59.2 + 0.096 * S µs
/// - Approve: 42.27 + .116 * S µs
/// - Complete: 50.91 + .232 * S µs
/// - Create: 46.55 + 0.089 * S µs
/// - Approve: 34.03 + .112 * S µs
/// - Complete: 40.36 + .225 * S µs
/// - DB Weight:
/// - Reads: Multisig Storage, [Caller Account]
/// - Writes: Multisig Storage, [Caller Account]
Expand Down Expand Up @@ -471,16 +471,16 @@ decl_module! {
/// `MultisigDepositBase + threshold * MultisigDepositFactor`.
/// ----------------------------------
/// - Base Weight:
/// - Create: 56.3 + 0.107 * S
/// - Approve: 39.25 + 0.121 * S
/// - Create: 44.71 + 0.088 * S
/// - Approve: 31.48 + 0.116 * S
/// - DB Weight:
/// - Read: Multisig Storage, [Caller Account]
/// - Write: Multisig Storage, [Caller Account]
/// # </weight>
#[weight = FunctionOf(
|args: (&u16, &Vec<T::AccountId>, &Option<Timepoint<T::BlockNumber>>, &[u8; 32])| {
T::DbWeight::get().reads_writes(1, 1)
.saturating_add(60_000_000)
.saturating_add(45_000_000)
.saturating_add((args.1.len() as Weight).saturating_mul(120_000))
},
DispatchClass::Normal,
Expand Down Expand Up @@ -554,15 +554,15 @@ decl_module! {
/// - I/O: 1 read `O(S)`, one remove.
/// - Storage: removes one item.
/// ----------------------------------
/// - Base Weight: 46.71 + 0.09 * S
/// - Base Weight: 37.6 + 0.084 * S
/// - DB Weight:
/// - Read: Multisig Storage, [Caller Account]
/// - Write: Multisig Storage, [Caller Account]
/// # </weight>
#[weight = FunctionOf(
|args: (&u16, &Vec<T::AccountId>, &Timepoint<T::BlockNumber>, &[u8; 32])| {
T::DbWeight::get().reads_writes(1, 1)
.saturating_add(50_000_000)
.saturating_add(40_000_000)
.saturating_add((args.1.len() as Weight).saturating_mul(100_000))
},
DispatchClass::Normal,
Expand Down