Serialisable genesis config (#229)

* Genesis serialization

* Custom type for AuthorityId

* Merge w master

* Fixed a few minor issues

* Fixed unmerged file

* Renamed tag

* Deferred genesis loading

* Upated wasm runtime

* Minor issues
This commit is contained in:
Arkadiy Paronyan
2018-07-03 15:56:01 +02:00
committed by Gav Wood
parent 530340f531
commit c7067fa03a
19 changed files with 292 additions and 211 deletions
+9 -1
View File
@@ -22,6 +22,8 @@ extern crate ed25519;
extern crate clap;
extern crate exit_future;
extern crate tokio_timer;
extern crate serde;
extern crate serde_json;
extern crate polkadot_primitives;
extern crate polkadot_runtime;
extern crate polkadot_executor;
@@ -49,10 +51,15 @@ extern crate error_chain;
extern crate slog; // needed until we can reexport `slog_info` from `substrate_telemetry`
#[macro_use]
extern crate log;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate hex_literal;
mod components;
mod error;
mod config;
mod chain_spec;
use std::sync::Arc;
use std::thread;
@@ -69,6 +76,7 @@ use exit_future::Signal;
pub use self::error::{ErrorKind, Error};
pub use self::components::{Components, FullComponents, LightComponents};
pub use config::{Configuration, Role, PruningMode};
pub use chain_spec::ChainSpec;
/// Polkadot service.
pub struct Service<Components: components::Components> {
@@ -121,7 +129,7 @@ impl<Components> Service<Components>
pruning: config.pruning,
};
let (client, on_demand) = components.build_client(db_settings, executor, config.genesis_storage)?;
let (client, on_demand) = components.build_client(db_settings, executor, &config.chain_spec)?;
let api = components.build_api(client.clone());
let best_header = client.best_block_header()?;