Skip to content

Commit 542a719

Browse files
i5hiclaude
andcommitted
fix: electrum timeout type and pin bitcoind for tests
- electrum-client 0.25 takes Duration for timeout, not u8 - revert bitcoind dev-dep to 0.36 to keep test framework compiling Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f216910 commit 542a719

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ tokio = { version = "1.43.0", features = ["rt", "macros"] }
7878
anyhow = "1.0.100"
7979

8080
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dev-dependencies]
81-
bitcoind = { version = "0.40.0", features = ["25_2"] }
81+
bitcoind = { version = "0.36.0", features = ["25_0"] }
8282
elementsd = { version = "0.11.0", features = ["22_1_1"] }
8383

8484
[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dev-dependencies]

src/network/electrum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ enum ElectrumUrl {
2525
impl ElectrumUrl {
2626
pub fn build_client(&self, timeout: u8) -> Result<electrum_client::Client, Error> {
2727
let builder = electrum_client::ConfigBuilder::new();
28-
let builder = builder.timeout(Some(timeout));
28+
let builder = builder.timeout(Some(std::time::Duration::from_secs(timeout as u64)));
2929
let (url, builder) = match self {
3030
ElectrumUrl::Tls(url, validate) => {
3131
(format!("ssl://{url}"), builder.validate_domain(*validate))

0 commit comments

Comments
 (0)