mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Pass an executor through the Configuration (#4688)
* Pass an executor through the Configuration * Make tasks_executor mandatory * Fix tests
This commit is contained in:
committed by
Bastian Köcher
parent
b7a63e3b77
commit
169a48c0c5
@@ -98,7 +98,7 @@ pub fn run<I, T, E>(args: I, exit: E, version: sc_cli::VersionInfo) -> error::Re
|
||||
|
||||
match parse_and_prepare::<CustomSubcommands, NoCustom, _>(&version, "substrate-node", args) {
|
||||
ParseAndPrepare::Run(cmd) => cmd.run(load_spec, exit,
|
||||
|exit, _cli_args, _custom_args, config: Config<_, _>| {
|
||||
|exit, _cli_args, _custom_args, mut config: Config<_, _>| {
|
||||
info!("{}", version.name);
|
||||
info!(" version {}", config.full_version());
|
||||
info!(" by Parity Technologies, 2017-2019");
|
||||
@@ -111,6 +111,10 @@ pub fn run<I, T, E>(args: I, exit: E, version: sc_cli::VersionInfo) -> error::Re
|
||||
.enable_all()
|
||||
.build()
|
||||
.map_err(|e| format!("{:?}", e))?;
|
||||
config.tasks_executor = {
|
||||
let runtime_handle = runtime.handle().clone();
|
||||
Some(Box::new(move |fut| { runtime_handle.spawn(fut); }))
|
||||
};
|
||||
match config.roles {
|
||||
ServiceRoles::LIGHT => run_until_exit(
|
||||
runtime,
|
||||
|
||||
Reference in New Issue
Block a user