mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-23 12:16:25 +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:
1 parent
bcde7b4f3f
commit
b427bbb363
3 files changed
+15
-11
No files matched your search
@@ -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