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 authored and GitHub committed 2020-10-14 08:03:37 +00:00
1 parent bcde7b4f3f
commit b427bbb363
3 files changed
+15 -11

No files matched your search

+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)) => {