From b6fd4f42fcb3ff056fbc81b8c7d53ad782dfb32a Mon Sep 17 00:00:00 2001 From: maan2003 Date: Mon, 4 Nov 2024 20:14:08 +0530 Subject: [PATCH] fix: compile with tokio_unstable --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 8fc3972e1..715dc1976 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -666,6 +666,8 @@ impl Node { // FIXME: For now, we wait up to 100 secs (BDK_WALLET_SYNC_TIMEOUT_SECS + 10) to allow // event handling to exit gracefully even if it was blocked on the BDK wallet syncing. We // should drop this considerably post upgrading to BDK 1.0. + #[cfg(tokio_unstable)] + let runtime_clone = runtime.clone(); let timeout_res = tokio::task::block_in_place(move || { runtime.block_on(async { tokio::time::timeout( @@ -702,7 +704,7 @@ impl Node { log_trace!( self.logger, "Active runtime tasks left prior to shutdown: {}", - runtime.metrics().active_tasks_count() + runtime_clone.metrics().num_alive_tasks() ); }