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).
This commit is contained in:
Antoine Poinsot 2023-08-14 09:58:40 +02:00
parent 6c969aeacd
commit 5c87937d46
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304
3 changed files with 6 additions and 3 deletions

View File

@ -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(

View File

@ -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)
}

View File

@ -119,7 +119,6 @@ class Lianad(TailableProc):
self.wait_for_logs(
[
"Database initialized and checked",
"Connection to bitcoind established and checked.",
"JSONRPC server started.",
]
)