Fix frame_system renaming in contruct_runtime (#4412)

* Fix contruct_runtime

* Update lib.rs

* Update event.rs

* Update event.rs

* Update event.rs

* Update event.rs

* Update event.rs

* Update event.rs

* Update event.rs

Back to where we started

* Update chain_spec.rs

* Update genesis.rs

* Fix it properly
This commit is contained in:
Bastian Köcher
2019-12-17 10:54:50 +01:00
committed by GitHub
parent cd718cd77d
commit e19f5adfb7
4 changed files with 23 additions and 17 deletions
+1 -1
View File
@@ -225,7 +225,7 @@ pub fn testnet_genesis(
const STASH: Balance = 100 * DOLLARS;
GenesisConfig {
system: Some(SystemConfig {
frame_system: Some(SystemConfig {
code: WASM_BINARY.to_vec(),
changes_trie_config: Default::default(),
}),
+1 -2
View File
@@ -507,14 +507,13 @@ impl frame_system::offchain::CreateTransaction<Runtime, UncheckedExtrinsic> for
}
}
use frame_system as system;
construct_runtime!(
pub enum Runtime where
Block = Block,
NodeBlock = node_primitives::Block,
UncheckedExtrinsic = UncheckedExtrinsic
{
System: system::{Module, Call, Storage, Config, Event},
System: frame_system::{Module, Call, Storage, Config, Event},
Utility: pallet_utility::{Module, Call, Event},
Babe: pallet_babe::{Module, Call, Storage, Config, Inherent(Timestamp)},
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
+1 -1
View File
@@ -30,7 +30,7 @@ use sp_runtime::Perbill;
/// Create genesis runtime configuration for tests.
pub fn config(support_changes_trie: bool, code: Option<&[u8]>) -> GenesisConfig {
GenesisConfig {
system: Some(SystemConfig {
frame_system: Some(SystemConfig {
changes_trie_config: if support_changes_trie { Some(ChangesTrieConfiguration {
digest_interval: 2,
digest_levels: 2,
+20 -13
View File
@@ -543,21 +543,28 @@ macro_rules! __impl_outer_event_json_metadata {
}
}
#[allow(dead_code)]
pub fn __module_events_system() -> &'static [$crate::event::EventMetadata] {
system::Event::metadata()
$crate::__impl_outer_event_json_metadata! {
@DECL_MODULE_EVENT_FNS
$system <> ;
$( $module_name < $( $generic_params ),* > $( $instance )? ; )*
}
}
};
$crate::paste::item! {
$(
#[allow(dead_code)]
pub fn [< __module_events_ $module_name $( _ $instance )? >] () ->
&'static [$crate::event::EventMetadata]
{
$module_name::Event ::< $( $generic_params ),* > ::metadata()
}
)*
}
(@DECL_MODULE_EVENT_FNS
$(
$module_name:ident < $( $generic_params:path ),* > $( $instance:ident )? ;
)*
) => {
$crate::paste::item! {
$(
#[allow(dead_code)]
pub fn [< __module_events_ $module_name $( _ $instance )? >] () ->
&'static [$crate::event::EventMetadata]
{
$module_name::Event ::< $( $generic_params ),* > ::metadata()
}
)*
}
}
}