Make run_node_until_exit take a future (#7318)

The function takes a closure that resolved before to a `TaskManager`,
now it resolves to a `Future` which output is a `TaskManager`. This is
required for node setups that are async.
This commit is contained in:
Bastian Köcher
2020-10-14 10:03:37 +02:00
committed by GitHub
parent bcde7b4f3f
commit b427bbb363
3 changed files with 15 additions and 11 deletions
+5 -3
View File
@@ -72,9 +72,11 @@ pub fn run() -> Result<()> {
match &cli.subcommand {
None => {
let runner = cli.create_runner(&cli.run)?;
runner.run_node_until_exit(|config| match config.role {
Role::Light => service::new_light(config),
_ => service::new_full(config),
runner.run_node_until_exit(|config| async move {
match config.role {
Role::Light => service::new_light(config),
_ => service::new_full(config),
}
})
}
Some(Subcommand::Inspect(cmd)) => {