Replace simple parameter_types (#11254)

* update bin/node-template/runtime/src/lib.rs

* update frame/contracts/src/tests.rs

* update frame/executive/src/lib.rs

* update frame/grandpa/src/mock.rs

* update frame/im-online/src/mock.rs

* update frame/offences/benchmarking/src/mock.rs

* update frame/recovery/src/mock.rs

* update frame/referenda/src/mock.rs

* update frame/session/benchmarking/src/mock.rs

* update frame/staking/src/mock.rs

* update frame/state-trie-migration/src/lib.rs

* update frame/support/test/compile_pass/src/lib.rs

* frame/treasury/src/tests.rs

* update frame/whitelist/src/mock.rs

* update frame/vesting/src/mock.rs

* update test-utils/runtime/src/lib.rs

* update bin/node-template/runtime/src/lib.rs

* Update frame/grandpa/src/mock.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* resolve failed checks 1518659 & 1518669

* resolve format check

* backtrack to resolve compile error

* check --all --tests 

* cargo +nightly fmt 

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
Bisola Olasehinde
2022-04-29 03:25:50 +01:00
committed by GitHub
parent b0bfbbbc04
commit aaf693f05a
13 changed files with 35 additions and 78 deletions
+4 -9
View File
@@ -22,7 +22,7 @@
use crate as pallet_whitelist;
use frame_support::{
parameter_types,
construct_runtime, parameter_types,
traits::{ConstU32, ConstU64, Nothing},
};
use frame_system::EnsureRoot;
@@ -36,7 +36,7 @@ use sp_runtime::{
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
construct_runtime!(
pub enum Test where
Block = Block,
NodeBlock = Block,
@@ -49,7 +49,7 @@ frame_support::construct_runtime!(
}
);
frame_support::parameter_types! {
parameter_types! {
pub BlockWeights: frame_system::limits::BlockWeights =
frame_system::limits::BlockWeights::simple_max(1024);
}
@@ -92,16 +92,11 @@ impl pallet_balances::Config for Test {
type WeightInfo = ();
}
parameter_types! {
// Taken from Polkadot as reference.
pub const PreimageMaxSize: u32 = 4096 * 1024;
}
impl pallet_preimage::Config for Test {
type Event = Event;
type Currency = Balances;
type ManagerOrigin = EnsureRoot<Self::AccountId>;
type MaxSize = PreimageMaxSize;
type MaxSize = ConstU32<{ 4096 * 1024 }>; // PreimageMaxSize Taken from Polkadot as reference.
type BaseDeposit = ConstU64<1>;
type ByteDeposit = ConstU64<1>;
type WeightInfo = ();