mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
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:
@@ -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)) => {
|
||||
|
||||
Reference in New Issue
Block a user