Companion: Rename pallet trait Trait to Config (#2014)

* rename Trait -> Config

* revert diener changes

* rename HostConfig to ActiveConfig as more meaningful

* fix merge

* "Update Substrate"

* cargo update -p sp-io

Co-authored-by: parity-processbot <>
This commit is contained in:
Guillaume Thiolliere
2020-11-30 16:13:43 +01:00
committed by GitHub
parent 7df537fcdd
commit 2d4aa3a42e
76 changed files with 613 additions and 613 deletions
+29 -29
View File
@@ -210,7 +210,7 @@ parameter_types! {
pub const Version: RuntimeVersion = VERSION;
}
impl frame_system::Trait for Runtime {
impl frame_system::Config for Runtime {
type BaseCallFilter = BaseFilter;
type Origin = Origin;
type Call = Call;
@@ -255,7 +255,7 @@ impl<LocalCall> frame_system::offchain::CreateSignedTransaction<LocalCall> for R
call: Call,
public: <Signature as Verify>::Signer,
account: AccountId,
nonce: <Runtime as frame_system::Trait>::Index,
nonce: <Runtime as frame_system::Config>::Index,
) -> Option<(Call, <UncheckedExtrinsic as ExtrinsicT>::SignaturePayload)> {
// take the biggest period possible.
let period = BlockHashCount::get()
@@ -294,7 +294,7 @@ impl frame_system::offchain::SigningTypes for Runtime {
type Signature = Signature;
}
impl pallet_session::historical::Trait for Runtime {
impl pallet_session::historical::Config for Runtime {
type FullIdentification = pallet_staking::Exposure<AccountId, Balance>;
type FullIdentificationOf = pallet_staking::ExposureOf<Runtime>;
}
@@ -334,7 +334,7 @@ parameter_types! {
pub const ImOnlineUnsignedPriority: TransactionPriority = TransactionPriority::max_value();
}
impl pallet_im_online::Trait for Runtime {
impl pallet_im_online::Config for Runtime {
type AuthorityId = ImOnlineId;
type Event = Event;
type ReportUnresponsiveness = Offences;
@@ -343,7 +343,7 @@ impl pallet_im_online::Trait for Runtime {
type WeightInfo = ();
}
impl pallet_staking::Trait for Runtime {
impl pallet_staking::Config for Runtime {
type Currency = Balances;
type UnixTime = Timestamp;
type CurrencyToVote = frame_support::traits::U128CurrencyToVote;
@@ -374,7 +374,7 @@ parameter_types! {
pub const MaxLocks: u32 = 50;
}
impl pallet_balances::Trait for Runtime {
impl pallet_balances::Config for Runtime {
type Balance = Balance;
type DustRemoval = ();
type Event = Event;
@@ -401,19 +401,19 @@ parameter_types! {
pub OffencesWeightSoftLimit: Weight = Perbill::from_percent(60) * MaximumBlockWeight::get();
}
impl pallet_offences::Trait for Runtime {
impl pallet_offences::Config for Runtime {
type Event = Event;
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
type OnOffenceHandler = Staking;
type WeightSoftLimit = OffencesWeightSoftLimit;
}
impl pallet_authority_discovery::Trait for Runtime {}
impl pallet_authority_discovery::Config for Runtime {}
parameter_types! {
pub const MinimumPeriod: u64 = SLOT_DURATION / 2;
}
impl pallet_timestamp::Trait for Runtime {
impl pallet_timestamp::Config for Runtime {
type Moment = u64;
type OnTimestampSet = Babe;
type MinimumPeriod = MinimumPeriod;
@@ -424,7 +424,7 @@ parameter_types! {
pub const TransactionByteFee: Balance = 10 * MILLICENTS;
}
impl pallet_transaction_payment::Trait for Runtime {
impl pallet_transaction_payment::Config for Runtime {
type OnChargeTransaction = CurrencyAdapter<Balances, ToAuthor<Runtime>>;
type TransactionByteFee = TransactionByteFee;
type WeightToFee = WeightToFee;
@@ -435,7 +435,7 @@ parameter_types! {
pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(17);
}
impl pallet_session::Trait for Runtime {
impl pallet_session::Config for Runtime {
type Event = Event;
type ValidatorId = AccountId;
type ValidatorIdOf = pallet_staking::StashOf<Self>;
@@ -453,7 +453,7 @@ parameter_types! {
pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK;
}
impl pallet_babe::Trait for Runtime {
impl pallet_babe::Config for Runtime {
type EpochDuration = EpochDuration;
type ExpectedBlockTime = ExpectedBlockTime;
@@ -482,7 +482,7 @@ parameter_types! {
pub const IndexDeposit: Balance = 1 * DOLLARS;
}
impl pallet_indices::Trait for Runtime {
impl pallet_indices::Config for Runtime {
type AccountIndex = AccountIndex;
type Currency = Balances;
type Deposit = IndexDeposit;
@@ -494,7 +494,7 @@ parameter_types! {
pub const AttestationPeriod: BlockNumber = 50;
}
impl pallet_grandpa::Trait for Runtime {
impl pallet_grandpa::Config for Runtime {
type Event = Event;
type Call = Call;
@@ -518,54 +518,54 @@ parameter_types! {
}
// TODO: substrate#2986 implement this properly
impl pallet_authorship::Trait for Runtime {
impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Babe>;
type UncleGenerations = UncleGenerations;
type FilterUncle = ();
type EventHandler = (Staking, ImOnline);
}
impl parachains_origin::Trait for Runtime {}
impl parachains_origin::Config for Runtime {}
impl parachains_configuration::Trait for Runtime {}
impl parachains_configuration::Config for Runtime {}
impl parachains_inclusion::Trait for Runtime {
impl parachains_inclusion::Config for Runtime {
type Event = Event;
}
impl parachains_paras::Trait for Runtime {
impl parachains_paras::Config for Runtime {
type Origin = Origin;
}
impl parachains_session_info::Trait for Runtime {}
impl parachains_session_info::Config for Runtime {}
impl parachains_ump::Trait for Runtime {
impl parachains_ump::Config for Runtime {
type UmpSink = (); // TODO: #1873 To be handled by the XCM receiver.
}
impl parachains_dmp::Trait for Runtime {}
impl parachains_dmp::Config for Runtime {}
impl parachains_hrmp::Trait for Runtime {
impl parachains_hrmp::Config for Runtime {
type Origin = Origin;
}
impl parachains_inclusion_inherent::Trait for Runtime {}
impl parachains_inclusion_inherent::Config for Runtime {}
impl parachains_scheduler::Trait for Runtime {}
impl parachains_scheduler::Config for Runtime {}
impl parachains_initializer::Trait for Runtime {
impl parachains_initializer::Config for Runtime {
type Randomness = Babe;
}
impl paras_sudo_wrapper::Trait for Runtime {}
impl paras_sudo_wrapper::Config for Runtime {}
impl paras_registrar::Trait for Runtime {
impl paras_registrar::Config for Runtime {
type Currency = Balances;
type ParathreadDeposit = ParathreadDeposit;
type Origin = Origin;
}
impl pallet_sudo::Trait for Runtime {
impl pallet_sudo::Config for Runtime {
type Event = Event;
type Call = Call;
}