From 5c87937d4676354f19357e17b36655eb4853dbf9 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Mon, 14 Aug 2023 09:58:40 +0200 Subject: [PATCH] Add more bitcoind-related setup logging At startup it sometimes appear we may be hanging when setting up bitcoind. Add more loading to give more information about what's taking long to setup (for instance, loading the watchonly wallet). --- src/bitcoin/d/mod.rs | 2 ++ src/lib.rs | 6 ++++-- tests/test_framework/lianad.py | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bitcoin/d/mod.rs b/src/bitcoin/d/mod.rs index bc4a89be..f23bcae8 100644 --- a/src/bitcoin/d/mod.rs +++ b/src/bitcoin/d/mod.rs @@ -265,7 +265,9 @@ impl BitcoinD { watchonly_wallet_path: watchonly_wallet_path.clone(), retries: 0, }; + log::info!("Checking the connection to bitcoind."); dummy_bitcoind.check_connection()?; + log::info!("Connection to bitcoind checked."); // Now the connection is checked, create the clients with an appropriate timeout. let node_client = Client::with_transport( diff --git a/src/lib.rs b/src/lib.rs index d0e61392..aa4949b5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -292,12 +292,14 @@ fn setup_bitcoind( wo_name, )?; + log::info!("Creating a new watchonly wallet on bitcoind."); bitcoind.create_watchonly_wallet(&config.main_descriptor)?; - log::info!("Created a new watchonly wallet on bitcoind."); + log::info!("Watchonly wallet created."); } + log::info!("Loading our watchonly wallet on bitcoind."); bitcoind.maybe_load_watchonly_wallet()?; bitcoind.wallet_sanity_checks(&config.main_descriptor)?; - log::info!("Connection to bitcoind established and checked."); + log::info!("Watchonly wallet loaded on bitcoind and sanity checked."); Ok(bitcoind) } diff --git a/tests/test_framework/lianad.py b/tests/test_framework/lianad.py index eb273c31..dfd81cd9 100644 --- a/tests/test_framework/lianad.py +++ b/tests/test_framework/lianad.py @@ -119,7 +119,6 @@ class Lianad(TailableProc): self.wait_for_logs( [ "Database initialized and checked", - "Connection to bitcoind established and checked.", "JSONRPC server started.", ] )