cargo +nightly fmt (#3540)

* cargo +nightly fmt

* add cargo-fmt check to ci

* update ci

* fmt

* fmt

* skip macro

* ignore bridges
This commit is contained in:
Shawn Tabrizi
2021-08-02 12:47:33 +02:00
committed by GitHub
parent 30e3012270
commit ff5d56fb76
350 changed files with 20617 additions and 21266 deletions
+10 -8
View File
@@ -30,7 +30,7 @@ pub mod currency {
/// Time and blocks.
pub mod time {
use primitives::v0::{Moment, BlockNumber};
use primitives::v0::{BlockNumber, Moment};
pub const MILLISECS_PER_BLOCK: Moment = 6000;
pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK;
pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = 1 * HOURS;
@@ -46,13 +46,13 @@ pub mod time {
/// Fee-related.
pub mod fee {
pub use sp_runtime::Perbill;
use frame_support::weights::{
WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
};
use primitives::v0::Balance;
use runtime_common::ExtrinsicBaseWeight;
use frame_support::weights::{
WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients,
};
use smallvec::smallvec;
pub use sp_runtime::Perbill;
/// The block saturation level. Fees will be updates based on this value.
pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25);
@@ -86,10 +86,12 @@ pub mod fee {
#[cfg(test)]
mod tests {
use super::{
currency::{CENTS, MILLICENTS},
fee::WeightToFee,
};
use frame_support::weights::WeightToFeePolynomial;
use runtime_common::{MAXIMUM_BLOCK_WEIGHT, ExtrinsicBaseWeight};
use super::fee::WeightToFee;
use super::currency::{CENTS, MILLICENTS};
use runtime_common::{ExtrinsicBaseWeight, MAXIMUM_BLOCK_WEIGHT};
#[test]
// This function tests that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight is correct
+4 -2
View File
@@ -34,6 +34,8 @@ fn sample_size_is_sensible() {
let max_weight: Weight = RocksDbWeight::get().reads_writes(samples.into(), samples.into());
// Max sample cleanup should be no more than half the total block weight.
assert!(max_weight * 2 < BlockWeights::get().max_block);
assert!(<Runtime as auctions::Config>::WeightInfo::on_initialize() * 2 < BlockWeights::get().max_block);
assert!(
<Runtime as auctions::Config>::WeightInfo::on_initialize() * 2 <
BlockWeights::get().max_block
);
}
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -43,36 +42,35 @@ use sp_std::marker::PhantomData;
/// Weight functions for `frame_system`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
fn remark(_b: u32, ) -> Weight {
fn remark(_b: u32) -> Weight {
(1_238_000 as Weight)
}
fn remark_with_event(b: u32, ) -> Weight {
fn remark_with_event(b: u32) -> Weight {
(0 as Weight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(b as Weight))
}
fn set_heap_pages() -> Weight {
(1_689_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
(1_689_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_changes_trie_config() -> Weight {
(9_679_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn set_storage(i: u32, ) -> Weight {
fn set_storage(i: u32) -> Weight {
(0 as Weight)
// Standard Error: 0
.saturating_add((532_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
fn kill_storage(i: u32, ) -> Weight {
fn kill_storage(i: u32) -> Weight {
(0 as Weight)
// Standard Error: 0
.saturating_add((380_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
fn kill_prefix(p: u32, ) -> Weight {
fn kill_prefix(p: u32) -> Weight {
(0 as Weight)
// Standard Error: 0
.saturating_add((789_000 as Weight).saturating_mul(p as Weight))
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -44,8 +43,7 @@ use sp_std::marker::PhantomData;
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_election_provider_multi_phase::WeightInfo for WeightInfo<T> {
fn on_initialize_nothing() -> Weight {
(23_792_000 as Weight)
.saturating_add(T::DbWeight::get().reads(8 as Weight))
(23_792_000 as Weight).saturating_add(T::DbWeight::get().reads(8 as Weight))
}
fn on_initialize_open_signed() -> Weight {
(86_272_000 as Weight)
@@ -62,12 +60,12 @@ impl<T: frame_system::Config> pallet_election_provider_multi_phase::WeightInfo f
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn elect_queued(_v: u32, _t: u32, _a: u32, _d: u32, ) -> Weight {
fn elect_queued(_v: u32, _t: u32, _a: u32, _d: u32) -> Weight {
(5_511_380_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
fn submit_unsigned(v: u32, t: u32, a: u32, d: u32) -> Weight {
(0 as Weight)
// Standard Error: 12_000
.saturating_add((3_399_000 as Weight).saturating_mul(v as Weight))
@@ -80,7 +78,7 @@ impl<T: frame_system::Config> pallet_election_provider_multi_phase::WeightInfo f
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
fn feasibility_check(v: u32, t: u32, a: u32, d: u32) -> Weight {
(0 as Weight)
// Standard Error: 7_000
.saturating_add((3_426_000 as Weight).saturating_mul(v as Weight))
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -43,14 +42,14 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_identity`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
fn add_registrar(r: u32, ) -> Weight {
fn add_registrar(r: u32) -> Weight {
(20_852_000 as Weight)
// Standard Error: 2_000
.saturating_add((249_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_identity(r: u32, x: u32, ) -> Weight {
fn set_identity(r: u32, x: u32) -> Weight {
(50_867_000 as Weight)
// Standard Error: 14_000
.saturating_add((216_000 as Weight).saturating_mul(r as Weight))
@@ -59,7 +58,7 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_subs_new(s: u32, ) -> Weight {
fn set_subs_new(s: u32) -> Weight {
(39_701_000 as Weight)
// Standard Error: 1_000
.saturating_add((6_376_000 as Weight).saturating_mul(s as Weight))
@@ -68,7 +67,7 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
}
fn set_subs_old(p: u32, ) -> Weight {
fn set_subs_old(p: u32) -> Weight {
(40_181_000 as Weight)
// Standard Error: 0
.saturating_add((2_045_000 as Weight).saturating_mul(p as Weight))
@@ -76,7 +75,7 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
}
fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight {
fn clear_identity(r: u32, s: u32, x: u32) -> Weight {
(48_884_000 as Weight)
// Standard Error: 6_000
.saturating_add((140_000 as Weight).saturating_mul(r as Weight))
@@ -88,7 +87,7 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
}
fn request_judgement(r: u32, x: u32, ) -> Weight {
fn request_judgement(r: u32, x: u32) -> Weight {
(52_661_000 as Weight)
// Standard Error: 5_000
.saturating_add((250_000 as Weight).saturating_mul(r as Weight))
@@ -97,7 +96,7 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn cancel_request(r: u32, x: u32, ) -> Weight {
fn cancel_request(r: u32, x: u32) -> Weight {
(48_072_000 as Weight)
// Standard Error: 7_000
.saturating_add((173_000 as Weight).saturating_mul(r as Weight))
@@ -106,28 +105,28 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_fee(r: u32, ) -> Weight {
fn set_fee(r: u32) -> Weight {
(7_817_000 as Weight)
// Standard Error: 1_000
.saturating_add((220_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_account_id(r: u32, ) -> Weight {
fn set_account_id(r: u32) -> Weight {
(8_397_000 as Weight)
// Standard Error: 1_000
.saturating_add((223_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_fields(r: u32, ) -> Weight {
fn set_fields(r: u32) -> Weight {
(7_854_000 as Weight)
// Standard Error: 1_000
.saturating_add((216_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn provide_judgement(r: u32, x: u32, ) -> Weight {
fn provide_judgement(r: u32, x: u32) -> Weight {
(33_563_000 as Weight)
// Standard Error: 5_000
.saturating_add((232_000 as Weight).saturating_mul(r as Weight))
@@ -136,7 +135,7 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn kill_identity(r: u32, s: u32, _x: u32, ) -> Weight {
fn kill_identity(r: u32, s: u32, _x: u32) -> Weight {
(49_152_000 as Weight)
// Standard Error: 3_000
.saturating_add((72_000 as Weight).saturating_mul(r as Weight))
@@ -146,28 +145,28 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
}
fn add_sub(s: u32, ) -> Weight {
fn add_sub(s: u32) -> Weight {
(53_373_000 as Weight)
// Standard Error: 0
.saturating_add((162_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn rename_sub(s: u32, ) -> Weight {
fn rename_sub(s: u32) -> Weight {
(16_191_000 as Weight)
// Standard Error: 0
.saturating_add((19_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn remove_sub(s: u32, ) -> Weight {
fn remove_sub(s: u32) -> Weight {
(54_328_000 as Weight)
// Standard Error: 0
.saturating_add((143_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn quit_sub(s: u32, ) -> Weight {
fn quit_sub(s: u32) -> Weight {
(32_901_000 as Weight)
// Standard Error: 0
.saturating_add((145_000 as Weight).saturating_mul(s as Weight))
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -43,7 +42,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_im_online`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_im_online::WeightInfo for WeightInfo<T> {
fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight {
fn validate_unsigned_and_then_heartbeat(k: u32, e: u32) -> Weight {
(88_980_000 as Weight)
// Standard Error: 0
.saturating_add((167_000 as Weight).saturating_mul(k as Weight))
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -43,10 +42,10 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_multisig`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
fn as_multi_threshold_1(_z: u32, ) -> Weight {
fn as_multi_threshold_1(_z: u32) -> Weight {
(12_189_000 as Weight)
}
fn as_multi_create(s: u32, z: u32, ) -> Weight {
fn as_multi_create(s: u32, z: u32) -> Weight {
(50_768_000 as Weight)
// Standard Error: 0
.saturating_add((106_000 as Weight).saturating_mul(s as Weight))
@@ -55,7 +54,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
fn as_multi_create_store(s: u32, z: u32) -> Weight {
(56_293_000 as Weight)
// Standard Error: 0
.saturating_add((110_000 as Weight).saturating_mul(s as Weight))
@@ -64,7 +63,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
fn as_multi_approve(s: u32, z: u32) -> Weight {
(29_281_000 as Weight)
// Standard Error: 0
.saturating_add((105_000 as Weight).saturating_mul(s as Weight))
@@ -73,7 +72,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
fn as_multi_approve_store(s: u32, z: u32) -> Weight {
(53_770_000 as Weight)
// Standard Error: 0
.saturating_add((122_000 as Weight).saturating_mul(s as Weight))
@@ -82,7 +81,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
fn as_multi_complete(s: u32, z: u32) -> Weight {
(70_625_000 as Weight)
// Standard Error: 0
.saturating_add((212_000 as Weight).saturating_mul(s as Weight))
@@ -91,28 +90,28 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn approve_as_multi_create(s: u32, ) -> Weight {
fn approve_as_multi_create(s: u32) -> Weight {
(49_662_000 as Weight)
// Standard Error: 0
.saturating_add((107_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn approve_as_multi_approve(s: u32, ) -> Weight {
fn approve_as_multi_approve(s: u32) -> Weight {
(28_469_000 as Weight)
// Standard Error: 0
.saturating_add((107_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn approve_as_multi_complete(s: u32, ) -> Weight {
fn approve_as_multi_complete(s: u32) -> Weight {
(121_389_000 as Weight)
// Standard Error: 0
.saturating_add((212_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn cancel_as_multi(s: u32, ) -> Weight {
fn cancel_as_multi(s: u32) -> Weight {
(86_993_000 as Weight)
// Standard Error: 0
.saturating_add((102_000 as Weight).saturating_mul(s as Weight))
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -43,13 +42,13 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_proxy`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
fn proxy(p: u32, ) -> Weight {
fn proxy(p: u32) -> Weight {
(24_786_000 as Weight)
// Standard Error: 1_000
.saturating_add((133_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
}
fn proxy_announced(a: u32, p: u32, ) -> Weight {
fn proxy_announced(a: u32, p: u32) -> Weight {
(55_730_000 as Weight)
// Standard Error: 1_000
.saturating_add((558_000 as Weight).saturating_mul(a as Weight))
@@ -58,21 +57,21 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn remove_announcement(a: u32, _p: u32, ) -> Weight {
fn remove_announcement(a: u32, _p: u32) -> Weight {
(37_947_000 as Weight)
// Standard Error: 1_000
.saturating_add((560_000 as Weight).saturating_mul(a as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn reject_announcement(a: u32, _p: u32, ) -> Weight {
fn reject_announcement(a: u32, _p: u32) -> Weight {
(37_904_000 as Weight)
// Standard Error: 1_000
.saturating_add((562_000 as Weight).saturating_mul(a as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn announce(a: u32, p: u32, ) -> Weight {
fn announce(a: u32, p: u32) -> Weight {
(51_562_000 as Weight)
// Standard Error: 2_000
.saturating_add((550_000 as Weight).saturating_mul(a as Weight))
@@ -81,35 +80,35 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn add_proxy(p: u32, ) -> Weight {
fn add_proxy(p: u32) -> Weight {
(36_284_000 as Weight)
// Standard Error: 1_000
.saturating_add((223_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn remove_proxy(p: u32, ) -> Weight {
fn remove_proxy(p: u32) -> Weight {
(35_792_000 as Weight)
// Standard Error: 2_000
.saturating_add((249_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn remove_proxies(p: u32, ) -> Weight {
fn remove_proxies(p: u32) -> Weight {
(34_091_000 as Weight)
// Standard Error: 1_000
.saturating_add((136_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn anonymous(p: u32, ) -> Weight {
fn anonymous(p: u32) -> Weight {
(48_824_000 as Weight)
// Standard Error: 1_000
.saturating_add((31_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn kill_anonymous(p: u32, ) -> Weight {
fn kill_anonymous(p: u32) -> Weight {
(35_989_000 as Weight)
// Standard Error: 0
.saturating_add((134_000 as Weight).saturating_mul(p as Weight))
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -43,28 +42,28 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_scheduler`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> {
fn schedule(s: u32, ) -> Weight {
fn schedule(s: u32) -> Weight {
(28_493_000 as Weight)
// Standard Error: 0
.saturating_add((39_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn cancel(s: u32, ) -> Weight {
fn cancel(s: u32) -> Weight {
(27_793_000 as Weight)
// Standard Error: 14_000
.saturating_add((6_333_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn schedule_named(s: u32, ) -> Weight {
fn schedule_named(s: u32) -> Weight {
(34_482_000 as Weight)
// Standard Error: 1_000
.saturating_add((56_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn cancel_named(s: u32, ) -> Weight {
fn cancel_named(s: u32) -> Weight {
(29_087_000 as Weight)
// Standard Error: 14_000
.saturating_add((6_341_000 as Weight).saturating_mul(s as Weight))
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -58,14 +57,14 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn withdraw_unbonded_update(s: u32, ) -> Weight {
fn withdraw_unbonded_update(s: u32) -> Weight {
(50_384_000 as Weight)
// Standard Error: 0
.saturating_add((26_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
fn withdraw_unbonded_kill(s: u32) -> Weight {
(82_905_000 as Weight)
// Standard Error: 1_000
.saturating_add((2_287_000 as Weight).saturating_mul(s as Weight))
@@ -78,7 +77,7 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn kick(k: u32, ) -> Weight {
fn kick(k: u32) -> Weight {
(11_371_000 as Weight)
// Standard Error: 7_000
.saturating_add((16_959_000 as Weight).saturating_mul(k as Weight))
@@ -86,7 +85,7 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight)))
}
fn nominate(n: u32, ) -> Weight {
fn nominate(n: u32) -> Weight {
(40_353_000 as Weight)
// Standard Error: 12_000
.saturating_add((5_341_000 as Weight).saturating_mul(n as Weight))
@@ -95,8 +94,7 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn chill() -> Weight {
(17_740_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
(17_740_000 as Weight).saturating_add(T::DbWeight::get().reads(3 as Weight))
}
fn set_payee() -> Weight {
(11_624_000 as Weight)
@@ -109,28 +107,24 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn set_validator_count() -> Weight {
(2_082_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
(2_082_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn force_no_eras() -> Weight {
(2_311_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
(2_311_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn force_new_era() -> Weight {
(2_282_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
(2_282_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn force_new_era_always() -> Weight {
(2_230_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
(2_230_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_invulnerables(v: u32, ) -> Weight {
fn set_invulnerables(v: u32) -> Weight {
(2_352_000 as Weight)
// Standard Error: 0
.saturating_add((27_000 as Weight).saturating_mul(v as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn force_unstake(s: u32, ) -> Weight {
fn force_unstake(s: u32) -> Weight {
(58_375_000 as Weight)
// Standard Error: 1_000
.saturating_add((2_282_000 as Weight).saturating_mul(s as Weight))
@@ -138,14 +132,14 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(6 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
}
fn cancel_deferred_slash(s: u32, ) -> Weight {
fn cancel_deferred_slash(s: u32) -> Weight {
(3_430_757_000 as Weight)
// Standard Error: 222_000
.saturating_add((19_760_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
fn payout_stakers_dead_controller(n: u32) -> Weight {
(103_686_000 as Weight)
// Standard Error: 17_000
.saturating_add((47_044_000 as Weight).saturating_mul(n as Weight))
@@ -154,7 +148,7 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight)))
}
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
fn payout_stakers_alive_staked(n: u32) -> Weight {
(128_168_000 as Weight)
// Standard Error: 21_000
.saturating_add((59_293_000 as Weight).saturating_mul(n as Weight))
@@ -163,14 +157,14 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
}
fn rebond(l: u32, ) -> Weight {
fn rebond(l: u32) -> Weight {
(46_916_000 as Weight)
// Standard Error: 1_000
.saturating_add((64_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn set_history_depth(e: u32, ) -> Weight {
fn set_history_depth(e: u32) -> Weight {
(0 as Weight)
// Standard Error: 63_000
.saturating_add((33_032_000 as Weight).saturating_mul(e as Weight))
@@ -178,7 +172,7 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
}
fn reap_stash(s: u32, ) -> Weight {
fn reap_stash(s: u32) -> Weight {
(69_690_000 as Weight)
// Standard Error: 1_000
.saturating_add((2_271_000 as Weight).saturating_mul(s as Weight))
@@ -186,7 +180,7 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(8 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
}
fn new_era(v: u32, n: u32, ) -> Weight {
fn new_era(v: u32, n: u32) -> Weight {
(0 as Weight)
// Standard Error: 787_000
.saturating_add((310_720_000 as Weight).saturating_mul(v as Weight))
@@ -198,7 +192,7 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight)))
}
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight {
fn get_npos_voters(v: u32, n: u32, s: u32) -> Weight {
(0 as Weight)
// Standard Error: 110_000
.saturating_add((25_641_000 as Weight).saturating_mul(v as Weight))
@@ -211,7 +205,7 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
}
fn get_npos_targets(v: u32, ) -> Weight {
fn get_npos_targets(v: u32) -> Weight {
(0 as Weight)
// Standard Error: 36_000
.saturating_add((10_960_000 as Weight).saturating_mul(v as Weight))
@@ -219,8 +213,7 @@ impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
}
fn set_staking_limits() -> Weight {
(5_696_000 as Weight)
.saturating_add(T::DbWeight::get().writes(5 as Weight))
(5_696_000 as Weight).saturating_add(T::DbWeight::get().writes(5 as Weight))
}
fn chill_other() -> Weight {
(41_216_000 as Weight)
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -43,7 +42,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_utility`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
fn batch(c: u32, ) -> Weight {
fn batch(c: u32) -> Weight {
(15_136_000 as Weight)
// Standard Error: 0
.saturating_add((2_640_000 as Weight).saturating_mul(c as Weight))
@@ -51,7 +50,7 @@ impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
fn as_derivative() -> Weight {
(5_428_000 as Weight)
}
fn batch_all(c: u32, ) -> Weight {
fn batch_all(c: u32) -> Weight {
(16_887_000 as Weight)
// Standard Error: 0
.saturating_add((3_091_000 as Weight).saturating_mul(c as Weight))
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -43,42 +42,42 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_vesting`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
fn vest_locked(l: u32, ) -> Weight {
fn vest_locked(l: u32) -> Weight {
(42_241_000 as Weight)
// Standard Error: 13_000
.saturating_add((220_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn vest_unlocked(l: u32, ) -> Weight {
fn vest_unlocked(l: u32) -> Weight {
(45_263_000 as Weight)
// Standard Error: 10_000
.saturating_add((188_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn vest_other_locked(l: u32, ) -> Weight {
fn vest_other_locked(l: u32) -> Weight {
(41_538_000 as Weight)
// Standard Error: 17_000
.saturating_add((239_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn vest_other_unlocked(l: u32, ) -> Weight {
fn vest_other_unlocked(l: u32) -> Weight {
(44_715_000 as Weight)
// Standard Error: 13_000
.saturating_add((207_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn vested_transfer(l: u32, ) -> Weight {
fn vested_transfer(l: u32) -> Weight {
(100_413_000 as Weight)
// Standard Error: 13_000
.saturating_add((103_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn force_vested_transfer(l: u32, ) -> Weight {
fn force_vested_transfer(l: u32) -> Weight {
(99_525_000 as Weight)
// Standard Error: 13_000
.saturating_add((108_000 as Weight).saturating_mul(l as Weight))
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -58,7 +57,7 @@ impl<T: frame_system::Config> runtime_common::crowdloan::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn refund(k: u32, ) -> Weight {
fn refund(k: u32) -> Weight {
(0 as Weight)
// Standard Error: 28_000
.saturating_add((44_792_000 as Weight).saturating_mul(k as Weight))
@@ -87,7 +86,7 @@ impl<T: frame_system::Config> runtime_common::crowdloan::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn on_initialize(n: u32, ) -> Weight {
fn on_initialize(n: u32) -> Weight {
(0 as Weight)
// Standard Error: 20_000
.saturating_add((108_965_000 as Weight).saturating_mul(n as Weight))
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -48,7 +47,7 @@ impl<T: frame_system::Config> runtime_common::slots::WeightInfo for WeightInfo<T
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn manage_lease_period_start(c: u32, t: u32, ) -> Weight {
fn manage_lease_period_start(c: u32, t: u32) -> Weight {
(0 as Weight)
// Standard Error: 16_000
.saturating_add((16_002_000 as Weight).saturating_mul(c as Weight))