Rename pallet trait Trait to Config (#7599)

* rename Trait to Config

* add test asserting using Trait is still valid.

* fix ui tests
This commit is contained in:
Guillaume Thiolliere
2020-11-30 15:34:54 +01:00
committed by GitHub
parent dd3c84c362
commit 1cbfc9257f
200 changed files with 1767 additions and 1607 deletions
+7 -7
View File
@@ -43,7 +43,7 @@ impl_outer_dispatch! {
#[derive(Clone, Eq, PartialEq, Debug)]
pub struct Test;
impl frame_system::Trait for Test {
impl frame_system::Config for Test {
type BaseCallFilter = ();
type Origin = Origin;
type DbWeight = ();
@@ -73,7 +73,7 @@ impl frame_system::Trait for Test {
parameter_types! {
pub const ExistentialDeposit: Balance = 10;
}
impl pallet_balances::Trait for Test {
impl pallet_balances::Config for Test {
type MaxLocks = ();
type Balance = Balance;
type Event = ();
@@ -82,7 +82,7 @@ impl pallet_balances::Trait for Test {
type AccountStore = System;
type WeightInfo = ();
}
impl pallet_indices::Trait for Test {
impl pallet_indices::Config for Test {
type AccountIndex = AccountIndex;
type Event = ();
type Currency = Balances;
@@ -92,13 +92,13 @@ impl pallet_indices::Trait for Test {
parameter_types! {
pub const MinimumPeriod: u64 = 5;
}
impl pallet_timestamp::Trait for Test {
impl pallet_timestamp::Config for Test {
type Moment = u64;
type OnTimestampSet = ();
type MinimumPeriod = MinimumPeriod;
type WeightInfo = ();
}
impl pallet_session::historical::Trait for Test {
impl pallet_session::historical::Config for Test {
type FullIdentification = pallet_staking::Exposure<AccountId, Balance>;
type FullIdentificationOf = pallet_staking::ExposureOf<Test>;
}
@@ -124,7 +124,7 @@ impl pallet_session::SessionHandler<AccountId> for TestSessionHandler {
fn on_disabled(_: usize) {}
}
impl pallet_session::Trait for Test {
impl pallet_session::Config for Test {
type SessionManager = pallet_session::historical::NoteHistoricalRoot<Test, Staking>;
type Keys = SessionKeys;
type ShouldEndSession = pallet_session::PeriodicSessions<(), ()>;
@@ -161,7 +161,7 @@ impl<C> frame_system::offchain::SendTransactionTypes<C> for Test where
type Extrinsic = Extrinsic;
}
impl pallet_staking::Trait for Test {
impl pallet_staking::Config for Test {
type Currency = Balances;
type UnixTime = pallet_timestamp::Module<Self>;
type CurrencyToVote = frame_support::traits::SaturatingCurrencyToVote;