Bump Substrate (#871)

* Bump Substrate

* Change usage of "Module" to "Pallet"

Related Substrate PR: https://github.com/paritytech/substrate/pull/8372

* Add `OnSetCode` config param

Related Substrate PR: https://github.com/paritytech/substrate/pull/8496

* Update Aura Slot duration time type

Related Substrate PR: https://github.com/paritytech/substrate/pull/8386

* Add `OnSetCode` to mock runtimes

* Add support for multiple justifications

Related Substrate PR: https://github.com/paritytech/substrate/pull/7640

* Use updated justification type in more places

* Make GenesisConfig type non-optional

Related Substrate PR: https://github.com/paritytech/substrate/pull/8275

* Update service to use updated telemetry

Related Substrate PR: https://github.com/paritytech/substrate/pull/8143

* Appease Clippy
This commit is contained in:
Hernando Castano
2021-04-07 11:56:45 -04:00
committed by Bastian Köcher
parent d9c553374c
commit c6ae74725b
32 changed files with 501 additions and 395 deletions
+9 -8
View File
@@ -153,7 +153,7 @@ pub trait Config<I = DefaultInstance>: frame_system::Config {
}
decl_storage! {
trait Store for Module<T: Config<I>, I: Instance = DefaultInstance> as Dispatch {}
trait Store for Pallet<T: Config<I>, I: Instance = DefaultInstance> as Dispatch {}
}
decl_event!(
@@ -189,7 +189,7 @@ decl_module! {
}
}
impl<T: Config<I>, I: Instance> MessageDispatch<T::MessageId> for Module<T, I> {
impl<T: Config<I>, I: Instance> MessageDispatch<T::MessageId> for Pallet<T, I> {
type Message =
MessagePayload<T::SourceChainAccountId, T::TargetChainAccountPublic, T::TargetChainSignature, T::EncodedCall>;
@@ -455,8 +455,8 @@ mod tests {
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Module, Call, Config, Storage, Event<T>},
Dispatch: call_dispatch::{Module, Call, Event<T>},
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
Dispatch: call_dispatch::{Pallet, Call, Event<T>},
}
}
@@ -490,6 +490,7 @@ mod tests {
type BlockLength = ();
type DbWeight = ();
type SS58Prefix = ();
type OnSetCode = ();
}
impl Config for TestRuntime {
@@ -534,7 +535,7 @@ mod tests {
fn prepare_message(
origin: CallOrigin<AccountId, TestAccountPublic, TestSignature>,
call: Call,
) -> <Module<TestRuntime> as MessageDispatch<<TestRuntime as Config>::MessageId>>::Message {
) -> <Pallet<TestRuntime> as MessageDispatch<<TestRuntime as Config>::MessageId>>::Message {
MessagePayload {
spec_version: TEST_SPEC_VERSION,
weight: TEST_WEIGHT,
@@ -545,20 +546,20 @@ mod tests {
fn prepare_root_message(
call: Call,
) -> <Module<TestRuntime> as MessageDispatch<<TestRuntime as Config>::MessageId>>::Message {
) -> <Pallet<TestRuntime> as MessageDispatch<<TestRuntime as Config>::MessageId>>::Message {
prepare_message(CallOrigin::SourceRoot, call)
}
fn prepare_target_message(
call: Call,
) -> <Module<TestRuntime> as MessageDispatch<<TestRuntime as Config>::MessageId>>::Message {
) -> <Pallet<TestRuntime> as MessageDispatch<<TestRuntime as Config>::MessageId>>::Message {
let origin = CallOrigin::TargetAccount(1, TestAccountPublic(1), TestSignature(1));
prepare_message(origin, call)
}
fn prepare_source_message(
call: Call,
) -> <Module<TestRuntime> as MessageDispatch<<TestRuntime as Config>::MessageId>>::Message {
) -> <Pallet<TestRuntime> as MessageDispatch<<TestRuntime as Config>::MessageId>>::Message {
let origin = CallOrigin::SourceAccount(1);
prepare_message(origin, call)
}