From aae482078c9aa527b4c99e376df07b3a2d464407 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 6 Jan 2023 22:09:26 +0100 Subject: [PATCH] Remove unused types Signed-off-by: Oliver Tale-Yazdi --- frame/atomic-swap/src/tests.rs | 9 +-------- frame/aura/src/mock.rs | 5 ----- frame/authority-discovery/src/lib.rs | 2 -- frame/authorship/src/lib.rs | 6 ------ frame/babe/src/mock.rs | 5 ----- frame/collective/src/tests.rs | 2 -- frame/conviction-voting/src/tests.rs | 5 ----- frame/examples/basic/src/tests.rs | 5 ----- frame/examples/offchain-worker/src/tests.rs | 4 ---- frame/grandpa/src/mock.rs | 5 ----- frame/identity/src/tests.rs | 4 ---- frame/im-online/src/mock.rs | 5 ----- frame/indices/src/mock.rs | 10 +--------- frame/membership/src/lib.rs | 2 -- frame/message-queue/src/integration_test.rs | 4 ---- frame/message-queue/src/mock.rs | 4 ---- frame/multisig/src/tests.rs | 6 +----- frame/nicks/src/lib.rs | 6 +----- frame/offences/benchmarking/src/mock.rs | 8 -------- frame/offences/src/mock.rs | 11 +---------- frame/preimage/src/mock.rs | 14 ++------------ frame/proxy/src/tests.rs | 5 ----- frame/randomness-collective-flip/src/lib.rs | 2 -- frame/ranked-collective/src/tests.rs | 5 ----- frame/recovery/src/mock.rs | 5 ----- frame/referenda/src/mock.rs | 2 -- frame/root-offences/src/mock.rs | 5 ----- frame/scored-pool/src/mock.rs | 2 -- frame/session/src/mock.rs | 5 ----- frame/society/src/mock.rs | 2 -- frame/staking/src/mock.rs | 4 ---- frame/sudo/src/mock.rs | 11 +---------- frame/system/benches/bench.rs | 4 ---- frame/timestamp/src/mock.rs | 4 ---- frame/treasury/src/tests.rs | 4 ---- frame/vesting/src/mock.rs | 4 ---- frame/whitelist/src/mock.rs | 6 +----- 37 files changed, 9 insertions(+), 183 deletions(-) diff --git a/frame/atomic-swap/src/tests.rs b/frame/atomic-swap/src/tests.rs index 5ad63dfce55b4..081a449ec9a2e 100644 --- a/frame/atomic-swap/src/tests.rs +++ b/frame/atomic-swap/src/tests.rs @@ -3,10 +3,7 @@ use super::*; use crate as pallet_atomic_swap; -use frame_support::{ - parameter_types, - traits::{ConstU32, ConstU64}, -}; +use frame_support::traits::{ConstU32, ConstU64}; use sp_core::H256; use sp_runtime::{ testing::Header, @@ -28,10 +25,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/aura/src/mock.rs b/frame/aura/src/mock.rs index 07fa9aa680e80..7a07fe99ae25d 100644 --- a/frame/aura/src/mock.rs +++ b/frame/aura/src/mock.rs @@ -46,11 +46,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} - impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/authority-discovery/src/lib.rs b/frame/authority-discovery/src/lib.rs index b642a9ac283f2..39e01dba43b2b 100644 --- a/frame/authority-discovery/src/lib.rs +++ b/frame/authority-discovery/src/lib.rs @@ -226,8 +226,6 @@ mod tests { parameter_types! { pub const Period: BlockNumber = 1; pub const Offset: BlockNumber = 0; - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); } impl frame_system::Config for Test { diff --git a/frame/authorship/src/lib.rs b/frame/authorship/src/lib.rs index a40f32d36c265..4065472d92368 100644 --- a/frame/authorship/src/lib.rs +++ b/frame/authorship/src/lib.rs @@ -434,7 +434,6 @@ mod tests { use super::*; use crate as pallet_authorship; use frame_support::{ - parameter_types, traits::{ConstU32, ConstU64, OnFinalize, OnInitialize}, ConsensusEngineId, }; @@ -459,11 +458,6 @@ mod tests { } ); - parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); - } - impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/babe/src/mock.rs b/frame/babe/src/mock.rs index dbeb588c1830e..abae1b7e33157 100644 --- a/frame/babe/src/mock.rs +++ b/frame/babe/src/mock.rs @@ -64,11 +64,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} - impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/collective/src/tests.rs b/frame/collective/src/tests.rs index 648b6f88ec86c..5c90de9f91bf7 100644 --- a/frame/collective/src/tests.rs +++ b/frame/collective/src/tests.rs @@ -91,8 +91,6 @@ pub type MaxMembers = ConstU32<100>; parameter_types! { pub const MotionDuration: u64 = 3; pub const MaxProposals: u32 = 257; - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); } impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; diff --git a/frame/conviction-voting/src/tests.rs b/frame/conviction-voting/src/tests.rs index d20dcb66d6198..9caa451e0dae8 100644 --- a/frame/conviction-voting/src/tests.rs +++ b/frame/conviction-voting/src/tests.rs @@ -22,7 +22,6 @@ use std::collections::BTreeMap; use frame_support::{ assert_noop, assert_ok, parameter_types, traits::{ConstU32, ConstU64, Contains, Polling, VoteTally}, - weights::Weight, }; use sp_core::H256; use sp_runtime::{ @@ -56,10 +55,6 @@ impl Contains for BaseFilter { } } -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(Weight::from_ref_time(1_000_000)); -} impl frame_system::Config for Test { type BaseCallFilter = BaseFilter; type BlockWeights = (); diff --git a/frame/examples/basic/src/tests.rs b/frame/examples/basic/src/tests.rs index 97fbddfbc41e0..891c7c78628a1 100644 --- a/frame/examples/basic/src/tests.rs +++ b/frame/examples/basic/src/tests.rs @@ -21,7 +21,6 @@ use crate::*; use frame_support::{ assert_ok, dispatch::{DispatchInfo, GetDispatchInfo}, - parameter_types, traits::{ConstU64, OnInitialize}, }; use sp_core::H256; @@ -51,10 +50,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/examples/offchain-worker/src/tests.rs b/frame/examples/offchain-worker/src/tests.rs index 72c001fd6e6cc..2050d76a241ff 100644 --- a/frame/examples/offchain-worker/src/tests.rs +++ b/frame/examples/offchain-worker/src/tests.rs @@ -51,10 +51,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/grandpa/src/mock.rs b/frame/grandpa/src/mock.rs index 131f6cafcd179..c618705af0651 100644 --- a/frame/grandpa/src/mock.rs +++ b/frame/grandpa/src/mock.rs @@ -69,11 +69,6 @@ impl_opaque_keys! { } } -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} - impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/identity/src/tests.rs b/frame/identity/src/tests.rs index 6b0006971f0e6..baca70e2795fc 100644 --- a/frame/identity/src/tests.rs +++ b/frame/identity/src/tests.rs @@ -48,10 +48,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/im-online/src/mock.rs b/frame/im-online/src/mock.rs index 5782e1a615b8e..bcb13fa1be837 100644 --- a/frame/im-online/src/mock.rs +++ b/frame/im-online/src/mock.rs @@ -117,11 +117,6 @@ pub fn new_test_ext() -> sp_io::TestExternalities { result } -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} - impl frame_system::Config for Runtime { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/indices/src/mock.rs b/frame/indices/src/mock.rs index fd2e9fff16885..6b5373bb43b5a 100644 --- a/frame/indices/src/mock.rs +++ b/frame/indices/src/mock.rs @@ -20,10 +20,7 @@ #![cfg(test)] use crate::{self as pallet_indices, Config}; -use frame_support::{ - parameter_types, - traits::{ConstU32, ConstU64}, -}; +use frame_support::traits::{ConstU32, ConstU64}; use sp_core::H256; use sp_runtime::testing::Header; @@ -42,11 +39,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} - impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/membership/src/lib.rs b/frame/membership/src/lib.rs index 77b53aa72dad8..8531af120ec88 100644 --- a/frame/membership/src/lib.rs +++ b/frame/membership/src/lib.rs @@ -539,8 +539,6 @@ mod tests { ); parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); pub static Members: Vec = vec![]; pub static Prime: Option = None; } diff --git a/frame/message-queue/src/integration_test.rs b/frame/message-queue/src/integration_test.rs index f4b1b7a125449..c9e3b2e870fd8 100644 --- a/frame/message-queue/src/integration_test.rs +++ b/frame/message-queue/src/integration_test.rs @@ -54,10 +54,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/message-queue/src/mock.rs b/frame/message-queue/src/mock.rs index 7159840d1c01b..37e504ac50033 100644 --- a/frame/message-queue/src/mock.rs +++ b/frame/message-queue/src/mock.rs @@ -47,10 +47,6 @@ frame_support::construct_runtime!( MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event}, } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/multisig/src/tests.rs b/frame/multisig/src/tests.rs index 206e566cf4cb6..13493587caa2b 100644 --- a/frame/multisig/src/tests.rs +++ b/frame/multisig/src/tests.rs @@ -23,7 +23,7 @@ use super::*; use crate as pallet_multisig; use frame_support::{ - assert_noop, assert_ok, parameter_types, + assert_noop, assert_ok, traits::{ConstU32, ConstU64, Contains}, }; use sp_core::H256; @@ -47,10 +47,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} impl frame_system::Config for Test { type BaseCallFilter = TestBaseCallFilter; type BlockWeights = (); diff --git a/frame/nicks/src/lib.rs b/frame/nicks/src/lib.rs index 79daeb9bdb9a8..3d8307c434107 100644 --- a/frame/nicks/src/lib.rs +++ b/frame/nicks/src/lib.rs @@ -250,7 +250,7 @@ mod tests { use crate as pallet_nicks; use frame_support::{ - assert_noop, assert_ok, ord_parameter_types, parameter_types, + assert_noop, assert_ok, ord_parameter_types, traits::{ConstU32, ConstU64}, }; use frame_system::EnsureSignedBy; @@ -275,10 +275,6 @@ mod tests { } ); - parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); - } impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/offences/benchmarking/src/mock.rs b/frame/offences/benchmarking/src/mock.rs index 223f551a6e5c1..592e821a81d8c 100644 --- a/frame/offences/benchmarking/src/mock.rs +++ b/frame/offences/benchmarking/src/mock.rs @@ -24,7 +24,6 @@ use frame_election_provider_support::{onchain, SequentialPhragmen}; use frame_support::{ parameter_types, traits::{ConstU32, ConstU64}, - weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}, }; use frame_system as system; use pallet_session::historical as pallet_session_historical; @@ -38,13 +37,6 @@ type AccountIndex = u32; type BlockNumber = u64; type Balance = u64; -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max( - Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX) - ); -} - impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/offences/src/mock.rs b/frame/offences/src/mock.rs index 8e4256ec3d3e6..63d2b0de34780 100644 --- a/frame/offences/src/mock.rs +++ b/frame/offences/src/mock.rs @@ -25,10 +25,7 @@ use codec::Encode; use frame_support::{ parameter_types, traits::{ConstU32, ConstU64}, - weights::{ - constants::{RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}, - Weight, - }, + weights::{constants::RocksDbWeight, Weight}, }; use sp_core::H256; use sp_runtime::{ @@ -83,12 +80,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max( - Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX), - ); -} impl frame_system::Config for Runtime { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/preimage/src/mock.rs b/frame/preimage/src/mock.rs index ce74ea65bd8aa..d81f5a9c3232c 100644 --- a/frame/preimage/src/mock.rs +++ b/frame/preimage/src/mock.rs @@ -15,13 +15,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! # Scheduler test environment. +//! # Preimage test environment. use super::*; use crate as pallet_preimage; use frame_support::{ - ord_parameter_types, parameter_types, + ord_parameter_types, traits::{ConstU32, ConstU64, Everything}, weights::constants::RocksDbWeight, }; @@ -30,7 +30,6 @@ use sp_core::H256; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, - Perbill, }; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; @@ -48,10 +47,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(Weight::from_ref_time(2_000_000_000_000)); -} impl frame_system::Config for Test { type BaseCallFilter = Everything; type BlockWeights = (); @@ -91,11 +86,6 @@ impl pallet_balances::Config for Test { type ReserveIdentifier = [u8; 8]; } -parameter_types! { - pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * BlockWeights::get().max_block; - pub const MaxScheduledPerBlock: u32 = 10; -} - ord_parameter_types! { pub const One: u64 = 1; } diff --git a/frame/proxy/src/tests.rs b/frame/proxy/src/tests.rs index 17bc7bcb92ee1..3eb3ab3705332 100644 --- a/frame/proxy/src/tests.rs +++ b/frame/proxy/src/tests.rs @@ -26,7 +26,6 @@ use codec::{Decode, Encode}; use frame_support::{ assert_noop, assert_ok, dispatch::DispatchError, - parameter_types, traits::{ConstU32, ConstU64, Contains}, RuntimeDebug, }; @@ -52,10 +51,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} impl frame_system::Config for Test { type BaseCallFilter = BaseFilter; type BlockWeights = (); diff --git a/frame/randomness-collective-flip/src/lib.rs b/frame/randomness-collective-flip/src/lib.rs index be970ba2a8422..d92b053655dc9 100644 --- a/frame/randomness-collective-flip/src/lib.rs +++ b/frame/randomness-collective-flip/src/lib.rs @@ -186,8 +186,6 @@ mod tests { ); parameter_types! { - pub BlockWeights: limits::BlockWeights = limits::BlockWeights - ::simple_max(Weight::from_ref_time(1024)); pub BlockLength: limits::BlockLength = limits::BlockLength ::max(2 * 1024); } diff --git a/frame/ranked-collective/src/tests.rs b/frame/ranked-collective/src/tests.rs index 68bb79f3d07f7..c11d4877d3577 100644 --- a/frame/ranked-collective/src/tests.rs +++ b/frame/ranked-collective/src/tests.rs @@ -22,7 +22,6 @@ use std::collections::BTreeMap; use frame_support::{ assert_noop, assert_ok, error::BadOrigin, - pallet_prelude::Weight, parameter_types, traits::{ConstU16, ConstU32, ConstU64, EitherOf, Everything, MapSuccess, Polling}, }; @@ -49,10 +48,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(Weight::from_ref_time(1_000_000)); -} impl frame_system::Config for Test { type BaseCallFilter = Everything; type BlockWeights = (); diff --git a/frame/recovery/src/mock.rs b/frame/recovery/src/mock.rs index 2a29390fdd20f..05ca8e6a30a0e 100644 --- a/frame/recovery/src/mock.rs +++ b/frame/recovery/src/mock.rs @@ -45,11 +45,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} - impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/referenda/src/mock.rs b/frame/referenda/src/mock.rs index c98fbf9a676b1..e957027e561ab 100644 --- a/frame/referenda/src/mock.rs +++ b/frame/referenda/src/mock.rs @@ -63,8 +63,6 @@ impl Contains for BaseFilter { parameter_types! { pub MaxWeight: Weight = Weight::from_ref_time(2_000_000_000_000); - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(MaxWeight::get()); } impl frame_system::Config for Test { type BaseCallFilter = BaseFilter; diff --git a/frame/root-offences/src/mock.rs b/frame/root-offences/src/mock.rs index e1d9ee14ee2fc..273fbf614169d 100644 --- a/frame/root-offences/src/mock.rs +++ b/frame/root-offences/src/mock.rs @@ -84,11 +84,6 @@ impl sp_runtime::BoundToRuntimeAppPublic for OtherSessionHandler { type Public = UintAuthorityId; } -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} - impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/scored-pool/src/mock.rs b/frame/scored-pool/src/mock.rs index d6f653b32ad2d..951871dd83c5c 100644 --- a/frame/scored-pool/src/mock.rs +++ b/frame/scored-pool/src/mock.rs @@ -48,8 +48,6 @@ construct_runtime!( parameter_types! { pub const CandidateDeposit: u64 = 25; - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); } ord_parameter_types! { pub const KickOrigin: u64 = 2; diff --git a/frame/session/src/mock.rs b/frame/session/src/mock.rs index aa13eacba9564..1138bd9543989 100644 --- a/frame/session/src/mock.rs +++ b/frame/session/src/mock.rs @@ -238,11 +238,6 @@ pub fn new_test_ext() -> sp_io::TestExternalities { sp_io::TestExternalities::new(t) } -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} - impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/society/src/mock.rs b/frame/society/src/mock.rs index 0b1b93aeae761..24544bf9e82dd 100644 --- a/frame/society/src/mock.rs +++ b/frame/society/src/mock.rs @@ -49,8 +49,6 @@ frame_support::construct_runtime!( parameter_types! { pub const SocietyPalletId: PalletId = PalletId(*b"py/socie"); - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); } ord_parameter_types! { diff --git a/frame/staking/src/mock.rs b/frame/staking/src/mock.rs index 843e452125a6e..ad27a82910a6f 100644 --- a/frame/staking/src/mock.rs +++ b/frame/staking/src/mock.rs @@ -114,10 +114,6 @@ impl FindAuthor for Author11 { } parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max( - Weight::from_parts(frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND * 2, u64::MAX), - ); pub static SessionsPerEra: SessionIndex = 3; pub static ExistentialDeposit: Balance = 1; pub static SlashDeferDuration: EraIndex = 0; diff --git a/frame/sudo/src/mock.rs b/frame/sudo/src/mock.rs index 639e81ceaa308..f8a03836f8f0f 100644 --- a/frame/sudo/src/mock.rs +++ b/frame/sudo/src/mock.rs @@ -19,12 +19,7 @@ use super::*; use crate as sudo; -use frame_support::{ - parameter_types, - traits::{ConstU32, ConstU64, Contains, GenesisBuild}, - weights::Weight, -}; -use frame_system::limits; +use frame_support::traits::{ConstU32, ConstU64, Contains, GenesisBuild}; use sp_core::H256; use sp_io; use sp_runtime::{ @@ -111,10 +106,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: limits::BlockWeights = limits::BlockWeights::simple_max(Weight::from_ref_time(1024)); -} - pub struct BlockEverything; impl Contains for BlockEverything { fn contains(_: &RuntimeCall) -> bool { diff --git a/frame/system/benches/bench.rs b/frame/system/benches/bench.rs index 0881b81eaca7d..a623a17dc49b2 100644 --- a/frame/system/benches/bench.rs +++ b/frame/system/benches/bench.rs @@ -62,10 +62,6 @@ frame_support::construct_runtime!( ); frame_support::parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::with_sensible_defaults( - Weight::from_ref_time(4 * 1024 * 1024), Perbill::from_percent(75), - ); pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength::max_with_normal_ratio( 4 * 1024 * 1024, Perbill::from_percent(75), diff --git a/frame/timestamp/src/mock.rs b/frame/timestamp/src/mock.rs index 2208510f24fe5..e1ba5cd11e615 100644 --- a/frame/timestamp/src/mock.rs +++ b/frame/timestamp/src/mock.rs @@ -46,10 +46,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/treasury/src/tests.rs b/frame/treasury/src/tests.rs index 9cfe147ec4ce4..e6a1ea0f543fe 100644 --- a/frame/treasury/src/tests.rs +++ b/frame/treasury/src/tests.rs @@ -51,10 +51,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); diff --git a/frame/vesting/src/mock.rs b/frame/vesting/src/mock.rs index 0bd371a0353f1..da9490bea66c0 100644 --- a/frame/vesting/src/mock.rs +++ b/frame/vesting/src/mock.rs @@ -43,10 +43,6 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} impl frame_system::Config for Test { type AccountData = pallet_balances::AccountData; type AccountId = u64; diff --git a/frame/whitelist/src/mock.rs b/frame/whitelist/src/mock.rs index ef5d3d4fb4d34..e08c2875aec51 100644 --- a/frame/whitelist/src/mock.rs +++ b/frame/whitelist/src/mock.rs @@ -22,7 +22,7 @@ use crate as pallet_whitelist; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, traits::{ConstU32, ConstU64, Nothing}, }; use frame_system::EnsureRoot; @@ -49,10 +49,6 @@ construct_runtime!( } ); -parameter_types! { - pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); -} impl frame_system::Config for Test { type BaseCallFilter = Nothing; type BlockWeights = ();