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
@@ -16,7 +16,7 @@
// limitations under the License.
use codec::{Encode, Decode};
use crate::{Trait, Module, BlockHash};
use crate::{Config, Module, BlockHash};
use frame_support::StorageMap;
use sp_runtime::{
generic::Era,
@@ -28,16 +28,16 @@ use sp_runtime::{
/// Check for transaction mortality.
#[derive(Encode, Decode, Clone, Eq, PartialEq)]
pub struct CheckMortality<T: Trait + Send + Sync>(Era, sp_std::marker::PhantomData<T>);
pub struct CheckMortality<T: Config + Send + Sync>(Era, sp_std::marker::PhantomData<T>);
impl<T: Trait + Send + Sync> CheckMortality<T> {
impl<T: Config + Send + Sync> CheckMortality<T> {
/// utility constructor. Used only in client/factory code.
pub fn from(era: Era) -> Self {
Self(era, sp_std::marker::PhantomData)
}
}
impl<T: Trait + Send + Sync> sp_std::fmt::Debug for CheckMortality<T> {
impl<T: Config + Send + Sync> sp_std::fmt::Debug for CheckMortality<T> {
#[cfg(feature = "std")]
fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
write!(f, "CheckMortality({:?})", self.0)
@@ -49,7 +49,7 @@ impl<T: Trait + Send + Sync> sp_std::fmt::Debug for CheckMortality<T> {
}
}
impl<T: Trait + Send + Sync> SignedExtension for CheckMortality<T> {
impl<T: Config + Send + Sync> SignedExtension for CheckMortality<T> {
type AccountId = T::AccountId;
type Call = T::Call;
type AdditionalSigned = T::Hash;