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
@@ -41,10 +41,10 @@ use sp_runtime::traits::{One, StaticLookup};
const MAX_VALIDATORS: u32 = 1000;
pub struct Module<T: Trait>(pallet_session::Module<T>);
pub trait Trait: pallet_session::Trait + pallet_session::historical::Trait + pallet_staking::Trait {}
pub struct Module<T: Config>(pallet_session::Module<T>);
pub trait Config: pallet_session::Config + pallet_session::historical::Config + pallet_staking::Config {}
impl<T: Trait> OnInitialize<T::BlockNumber> for Module<T> {
impl<T: Config> OnInitialize<T::BlockNumber> for Module<T> {
fn on_initialize(n: T::BlockNumber) -> frame_support::weights::Weight {
pallet_session::Module::<T>::on_initialize(n)
}
@@ -121,7 +121,7 @@ benchmarks! {
/// Sets up the benchmark for checking a membership proof. It creates the given
/// number of validators, sets random session keys and then creates a membership
/// proof for the first authority and returns its key and the proof.
fn check_membership_proof_setup<T: Trait>(
fn check_membership_proof_setup<T: Config>(
n: u32,
) -> (
(sp_runtime::KeyTypeId, &'static [u8; 32]),