Add detailed logging for RPC connection and fix wallet URL construction
This commit is contained in:
parent
f154330dba
commit
040c643175
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1740,7 +1740,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sdk_common"
|
name = "sdk_common"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://git.4nkweb.com/4nk/sdk_common.git?branch=dev#a4c2fd209016f46dfb94c513c5db2c18d27b1f8a"
|
source = "git+https://git.4nkweb.com/4nk/sdk_common.git?branch=docker-support#a4c2fd209016f46dfb94c513c5db2c18d27b1f8a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes-gcm",
|
"aes-gcm",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
@ -92,10 +92,15 @@ fn read_cookie(path: &Path) -> Result<(String, String)> {
|
|||||||
|
|
||||||
fn rpc_connect(rpcwallet: Option<String>, network: Network, mut rpc_url: String, cookie_path: Option<PathBuf>) -> Result<Client> {
|
fn rpc_connect(rpcwallet: Option<String>, network: Network, mut rpc_url: String, cookie_path: Option<PathBuf>) -> Result<Client> {
|
||||||
match rpcwallet {
|
match rpcwallet {
|
||||||
Some(rpcwallet) => rpc_url.push_str(&rpcwallet),
|
Some(ref rpcwallet) => {
|
||||||
|
rpc_url.push_str("/wallet/");
|
||||||
|
rpc_url.push_str(rpcwallet);
|
||||||
|
},
|
||||||
None => (),
|
None => (),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log::info!("Attempting to connect to Bitcoin Core at: {}", rpc_url);
|
||||||
|
|
||||||
// Allow `wait_for_new_block` to take a bit longer before timing out.
|
// Allow `wait_for_new_block` to take a bit longer before timing out.
|
||||||
// See https://github.com/romanz/electrs/issues/495 for more details.
|
// See https://github.com/romanz/electrs/issues/495 for more details.
|
||||||
let builder = jsonrpc::simple_http::SimpleHttpTransport::builder()
|
let builder = jsonrpc::simple_http::SimpleHttpTransport::builder()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user