mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 15:11:03 +00:00
Replace parameter_types with ConstU32 &c. (#10402)
* remove parameter types and use const type
* remove parameter types and use const type
* Delete {
* Delete count,
* refractor for beefy, benchmarking, child bounties, and collective pallets
* refractor for pallet contracts
* refractor for elections
* refractor for more pallets
* fix CI issues
* fix CI issues
* fix CI issues
* fix CI issues
* remove warning to fix CI issue
* remove warning to fix CI issue
refractor for pallet preimage
* remove warning to fix CI issue
refractor for pallet proxy
* remove warning to fix CI issue
refractor for pallet recovery
refractor for pallet randomness-collective-flip
* remove warning to fix CI issue
refractor for pallet scored-pool
refractor for pallet scheduler
refractor for pallet session
* remove warning to fix CI issue
refractor for pallet society, support, system, timestamp, tips
* remove warning to fix CI issue
refractor for pallet transaction_payment, transaction_storage, treasury, uniques, utility
* remove warning to fix CI issue
* cargo +nightly fmt
* CI fix
* more param refractor on beefy-mmr
* refractor for beefy
* Update frame/babe/src/mock.rs
* Update frame/babe/src/mock.rs
* Update frame/bounties/src/tests.rs
* Update frame/tips/src/tests.rs
* Delete mock.rs
* Update frame/examples/basic/src/tests.rs
* Apply suggestions from code review
* Update frame/im-online/src/mock.rs
* Update frame/im-online/src/mock.rs
* Update frame/offences/benchmarking/src/mock.rs
* Update frame/session/benchmarking/src/mock.rs
* Update frame/support/test/tests/pallet_compatibility.rs
* Update frame/support/test/tests/pallet_compatibility_instance.rs
* Update frame/treasury/src/tests.rs
* Update test-utils/runtime/src/lib.rs
* some cleanup
* fmt
* remove unused
Co-authored-by: Damilare <dakinlose@teamapt.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -20,7 +20,10 @@
|
||||
#![cfg(test)]
|
||||
|
||||
use frame_election_provider_support::onchain;
|
||||
use frame_support::parameter_types;
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
traits::{ConstU32, ConstU64},
|
||||
};
|
||||
use sp_runtime::traits::IdentityLookup;
|
||||
|
||||
type AccountId = u64;
|
||||
@@ -68,7 +71,7 @@ impl frame_system::Config for Test {
|
||||
type SystemWeightInfo = ();
|
||||
type SS58Prefix = ();
|
||||
type OnSetCode = ();
|
||||
type MaxConsumers = frame_support::traits::ConstU32<16>;
|
||||
type MaxConsumers = ConstU32<16>;
|
||||
}
|
||||
parameter_types! {
|
||||
pub const ExistentialDeposit: Balance = 10;
|
||||
@@ -85,13 +88,10 @@ impl pallet_balances::Config for Test {
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const MinimumPeriod: u64 = 5;
|
||||
}
|
||||
impl pallet_timestamp::Config for Test {
|
||||
type Moment = u64;
|
||||
type OnTimestampSet = ();
|
||||
type MinimumPeriod = MinimumPeriod;
|
||||
type MinimumPeriod = ConstU64<5>;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
impl pallet_session::historical::Config for Test {
|
||||
@@ -144,8 +144,6 @@ pallet_staking_reward_curve::build! {
|
||||
}
|
||||
parameter_types! {
|
||||
pub const RewardCurve: &'static sp_runtime::curve::PiecewiseLinear<'static> = &I_NPOS;
|
||||
pub const MaxNominatorRewardedPerValidator: u32 = 64;
|
||||
pub const UnsignedPriority: u64 = 1 << 20;
|
||||
}
|
||||
|
||||
pub type Extrinsic = sp_runtime::testing::TestXt<Call, ()>;
|
||||
@@ -179,7 +177,7 @@ impl pallet_staking::Config for Test {
|
||||
type SessionInterface = Self;
|
||||
type EraPayout = pallet_staking::ConvertCurve<RewardCurve>;
|
||||
type NextNewSession = Session;
|
||||
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
|
||||
type MaxNominatorRewardedPerValidator = ConstU32<64>;
|
||||
type OffendingValidatorsThreshold = ();
|
||||
type ElectionProvider = onchain::OnChainSequentialPhragmen<Self>;
|
||||
type GenesisElectionProvider = Self::ElectionProvider;
|
||||
|
||||
Reference in New Issue
Block a user