From c31b29f0de70071cd91d3831daccc287d18bd9fa Mon Sep 17 00:00:00 2001 From: Gursharan Singh <3442979+G8XSU@users.noreply.github.com> Date: Fri, 1 Dec 2023 13:52:14 -0800 Subject: [PATCH] Use Multi threaded runtime in `sync_wallets` This is needed since so that components(such as `KVStore`) can use `block_in_place`. `block_in_place` is only allowed inside a multi-threaded runtime. `sync_wallets` internally syncs channel_manager and chain_monitor which results in persistence using `KVStore`. Using blocking `sync_wallets` should be avoided but is mostly used in functional_tests. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 33574972b..85073a733 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1003,7 +1003,7 @@ impl Node { ]; tokio::task::block_in_place(move || { - tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap().block_on( + tokio::runtime::Builder::new_multi_thread().enable_all().build().unwrap().block_on( async move { let now = Instant::now(); match wallet.sync().await {