fix construct_runtime (#2898)

This commit is contained in:
thiolliere
2019-06-18 17:06:37 +02:00
committed by Bastian Köcher
parent faabbb15c1
commit 72278748ab
2 changed files with 15 additions and 16 deletions
+2 -2
View File
@@ -247,7 +247,7 @@ construct_runtime!(
NodeBlock = node_primitives::Block,
UncheckedExtrinsic = UncheckedExtrinsic
{
System: system::{default, Config<T>},
System: system,
Aura: aura::{Module, Config<T>, Inherent(Timestamp)},
Timestamp: timestamp::{Module, Call, Storage, Config<T>, Inherent},
Indices: indices,
@@ -261,7 +261,7 @@ construct_runtime!(
FinalityTracker: finality_tracker::{Module, Call, Inherent},
Grandpa: grandpa::{Module, Call, Storage, Config<T>, Event},
Treasury: treasury,
Contract: contract::{Module, Call, Storage, Config<T>, Event<T>},
Contract: contract,
Sudo: sudo,
}
);
+13 -14
View File
@@ -109,7 +109,8 @@ macro_rules! construct_runtime {
) => {
$crate::construct_runtime!(
{ $( $preset )* };
{ $( $expanded )* $name: $module::{Module, Call, Storage, Event<T>, Config<T>}, };
{ $( $expanded )* };
$name: $module::{default},
$( $rest )*
);
};
@@ -117,27 +118,25 @@ macro_rules! construct_runtime {
{ $( $preset:tt )* };
{ $( $expanded:tt )* };
$name:ident: $module:ident::{
default,
$(
default
$(,
$modules:ident
$( <$modules_generic:ident $(, $modules_instance:ident)?> )*
$( ( $( $modules_args:ident ),* ) )*
),*
)*
},
$( $rest:tt )*
) => {
$crate::construct_runtime!(
{ $( $preset )* };
{
$( $expanded )*
$name: $module::{
Module, Call, Storage, Event<T>, Config<T>,
$(
$modules $( <$modules_generic $(, $modules_instance)?> )*
$( ( $( $modules_args ),* ) )*
),*
},
};
{ $( $expanded )* };
$name: $module::{
Module, Call, Storage, Event<T>, Config<T>
$(,
$modules $( <$modules_generic $(, $modules_instance)?> )*
$( ( $( $modules_args ),* ) )*
)*
},
$( $rest )*
);
};