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
+6 -6
View File
@@ -40,11 +40,11 @@ use sc_rpc_api::state::StateClient;
/// # use codec::Encode;
/// # use frame_support::{decl_storage, decl_module};
/// # use substrate_frame_rpc_support::StorageQuery;
/// # use frame_system::Trait;
/// # use frame_system::Config;
/// # use sc_rpc_api::state::StateClient;
/// #
/// # // Hash would normally be <TestRuntime as frame_system::Trait>::Hash, but we don't have
/// # // frame_system::Trait implemented for TestRuntime. Here we just pretend.
/// # // Hash would normally be <TestRuntime as frame_system::Config>::Hash, but we don't have
/// # // frame_system::Config implemented for TestRuntime. Here we just pretend.
/// # type Hash = ();
/// #
/// # fn main() -> Result<(), RpcError> {
@@ -54,7 +54,7 @@ use sc_rpc_api::state::StateClient;
/// # struct TestRuntime;
/// #
/// # decl_module! {
/// # pub struct Module<T: Trait> for enum Call where origin: T::Origin {}
/// # pub struct Module<T: Config> for enum Call where origin: T::Origin {}
/// # }
/// #
/// pub type Loc = (i64, i64, i64);
@@ -62,7 +62,7 @@ use sc_rpc_api::state::StateClient;
///
/// // Note that all fields are marked pub.
/// decl_storage! {
/// trait Store for Module<T: Trait> as TestRuntime {
/// trait Store for Module<T: Config> as TestRuntime {
/// pub LastActionId: u64;
/// pub Voxels: map hasher(blake2_128_concat) Loc => Block;
/// pub Actions: map hasher(blake2_128_concat) u64 => Loc;
@@ -125,7 +125,7 @@ impl<V: FullCodec> StorageQuery<V> {
/// Send this query over RPC, await the typed result.
///
/// Hash should be <YourRuntime as frame::Trait>::Hash.
/// Hash should be <YourRuntime as frame::Config>::Hash.
///
/// # Arguments
///