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
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for frame_system.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> frame_system::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
fn remark(_b: u32, ) -> Weight {
(1_815_000 as Weight)
}
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_balances.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_balances::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
fn transfer() -> Weight {
(91_625_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_collective.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_collective::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
fn set_members(m: u32, n: u32, p: u32, ) -> Weight {
(0 as Weight)
.saturating_add((20_744_000 as Weight).saturating_mul(m as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_democracy.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_democracy::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
fn propose() -> Weight {
(73_769_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_elections_phragmen.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_elections_phragmen::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_elections_phragmen::WeightInfo for WeightInfo<T> {
fn vote(v: u32, ) -> Weight {
(83_050_000 as Weight)
.saturating_add((124_000 as Weight).saturating_mul(v as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_identity.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_identity::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
fn add_registrar(r: u32, ) -> Weight {
(26_618_000 as Weight)
.saturating_add((318_000 as Weight).saturating_mul(r as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_im_online.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_im_online::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_im_online::WeightInfo for WeightInfo<T> {
fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight {
(108_140_000 as Weight)
.saturating_add((217_000 as Weight).saturating_mul(k as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_indices.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_indices::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_indices::WeightInfo for WeightInfo<T> {
fn claim() -> Weight {
(51_086_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_multisig.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_multisig::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
fn as_multi_threshold_1(z: u32, ) -> Weight {
(12_168_000 as Weight)
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_proxy.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_proxy::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
fn proxy(p: u32, ) -> Weight {
(30_797_000 as Weight)
.saturating_add((182_000 as Weight).saturating_mul(p as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_scheduler.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_scheduler::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> {
fn schedule(s: u32, ) -> Weight {
(33_450_000 as Weight)
.saturating_add((48_000 as Weight).saturating_mul(s as Weight))
@@ -41,7 +41,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_session.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_session::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> {
fn set_keys() -> Weight {
(89_426_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_staking.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_staking::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
fn bond() -> Weight {
(91_974_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_timestamp.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_timestamp::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> {
fn set() -> Weight {
(10_514_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_treasury.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_treasury::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
fn propose_spend() -> Weight {
(52_217_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_utility.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_utility::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
fn batch(c: u32, ) -> Weight {
(18_717_000 as Weight)
.saturating_add((1_995_000 as Weight).saturating_mul(c as Weight))
@@ -43,7 +43,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_vesting.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> pallet_vesting::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
fn vest_locked(l: u32, ) -> Weight {
(54_477_000 as Weight)
.saturating_add((129_000 as Weight).saturating_mul(l as Weight))