mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +00:00
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:
committed by
GitHub
parent
dd3c84c362
commit
1cbfc9257f
@@ -19,7 +19,7 @@
|
||||
|
||||
#![cfg(test)]
|
||||
|
||||
use crate::{AuthorityId, AuthorityList, ConsensusLog, Module, Trait};
|
||||
use crate::{AuthorityId, AuthorityList, ConsensusLog, Module, Config};
|
||||
use ::grandpa as finality_grandpa;
|
||||
use codec::Encode;
|
||||
use frame_support::{
|
||||
@@ -79,7 +79,7 @@ parameter_types! {
|
||||
pub const AvailableBlockRatio: Perbill = Perbill::one();
|
||||
}
|
||||
|
||||
impl frame_system::Trait for Test {
|
||||
impl frame_system::Config for Test {
|
||||
type BaseCallFilter = ();
|
||||
type Origin = Origin;
|
||||
type Index = u64;
|
||||
@@ -122,7 +122,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
/// Custom `SessionHandler` since we use `TestSessionKeys` as `Keys`.
|
||||
impl pallet_session::Trait for Test {
|
||||
impl pallet_session::Config for Test {
|
||||
type Event = TestEvent;
|
||||
type ValidatorId = u64;
|
||||
type ValidatorIdOf = pallet_staking::StashOf<Self>;
|
||||
@@ -135,7 +135,7 @@ impl pallet_session::Trait for Test {
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
impl pallet_session::historical::Trait for Test {
|
||||
impl pallet_session::historical::Config for Test {
|
||||
type FullIdentification = pallet_staking::Exposure<u64, u128>;
|
||||
type FullIdentificationOf = pallet_staking::ExposureOf<Self>;
|
||||
}
|
||||
@@ -144,7 +144,7 @@ parameter_types! {
|
||||
pub const UncleGenerations: u64 = 0;
|
||||
}
|
||||
|
||||
impl pallet_authorship::Trait for Test {
|
||||
impl pallet_authorship::Config for Test {
|
||||
type FindAuthor = ();
|
||||
type UncleGenerations = UncleGenerations;
|
||||
type FilterUncle = ();
|
||||
@@ -155,7 +155,7 @@ parameter_types! {
|
||||
pub const ExistentialDeposit: u128 = 1;
|
||||
}
|
||||
|
||||
impl pallet_balances::Trait for Test {
|
||||
impl pallet_balances::Config for Test {
|
||||
type MaxLocks = ();
|
||||
type Balance = u128;
|
||||
type DustRemoval = ();
|
||||
@@ -169,7 +169,7 @@ parameter_types! {
|
||||
pub const MinimumPeriod: u64 = 3;
|
||||
}
|
||||
|
||||
impl pallet_timestamp::Trait for Test {
|
||||
impl pallet_timestamp::Config for Test {
|
||||
type Moment = u64;
|
||||
type OnTimestampSet = ();
|
||||
type MinimumPeriod = MinimumPeriod;
|
||||
@@ -198,7 +198,7 @@ parameter_types! {
|
||||
pub const StakingUnsignedPriority: u64 = u64::max_value() / 2;
|
||||
}
|
||||
|
||||
impl pallet_staking::Trait for Test {
|
||||
impl pallet_staking::Config for Test {
|
||||
type RewardRemainder = ();
|
||||
type CurrencyToVote = frame_support::traits::SaturatingCurrencyToVote;
|
||||
type Event = TestEvent;
|
||||
@@ -227,14 +227,14 @@ parameter_types! {
|
||||
pub OffencesWeightSoftLimit: Weight = Perbill::from_percent(60) * MaximumBlockWeight::get();
|
||||
}
|
||||
|
||||
impl pallet_offences::Trait for Test {
|
||||
impl pallet_offences::Config for Test {
|
||||
type Event = TestEvent;
|
||||
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
|
||||
type OnOffenceHandler = Staking;
|
||||
type WeightSoftLimit = OffencesWeightSoftLimit;
|
||||
}
|
||||
|
||||
impl Trait for Test {
|
||||
impl Config for Test {
|
||||
type Event = TestEvent;
|
||||
type Call = Call;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user