Update to latest Substrate master (#783)

* Update to latest Substrate master

* Update wasm-builder and make `run` work
This commit is contained in:
Bastian Köcher
2020-01-22 12:27:28 +01:00
committed by GitHub
parent 5b129f1292
commit e6f4c36ed9
11 changed files with 377 additions and 434 deletions
+6 -2
View File
@@ -25,7 +25,7 @@ mod browser;
use chain_spec::ChainSpec;
use futures::{
Future, FutureExt, TryFutureExt, future::select, channel::oneshot,
Future, FutureExt, TryFutureExt, future::select, channel::oneshot, compat::Compat,
};
#[cfg(feature = "cli")]
use tokio::runtime::Runtime;
@@ -156,7 +156,7 @@ where
|exit, _cli_args, custom_args, mut config| {
info!("{}", version.name);
info!(" version {}", config.full_version());
info!(" by {}, 2017-2019", version.author);
info!(" by {}, 2017-2020", version.author);
info!("Chain specification: {}", config.chain_spec.name());
info!("Native runtime: {}", D::native_version().runtime_version);
if is_kusama {
@@ -171,6 +171,10 @@ where
config.custom = service::CustomConfiguration::default();
config.custom.authority_discovery_enabled = custom_args.authority_discovery_enabled;
let runtime = Runtime::new().map_err(|e| format!("{:?}", e))?;
config.tasks_executor = {
let runtime_handle = runtime.executor();
Some(Box::new(move |fut| { runtime_handle.spawn(Compat::new(fut.map(Ok))); }))
};
match config.roles {
service::Roles::LIGHT =>
run_until_exit(