From df616e701c8d6bd743fb5aba51de94db72be093e Mon Sep 17 00:00:00 2001 From: Binarybaron Date: Mon, 1 Dec 2025 19:59:31 +0100 Subject: [PATCH] fix(electrum-pool): retry once with underlying electrum client library to workaround bug in library where errors are swallowed --- electrum-pool/src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/electrum-pool/src/lib.rs b/electrum-pool/src/lib.rs index d0bd860d..f24af78b 100644 --- a/electrum-pool/src/lib.rs +++ b/electrum-pool/src/lib.rs @@ -550,7 +550,7 @@ impl Default for ElectrumBalancerConfig { fn default() -> Self { Self { request_timeout: 15, - min_retries: 15, + min_retries: 10, } } } @@ -571,7 +571,12 @@ impl ElectrumClientFactory> for BdkElectrumClientFacto ) -> Result>, Error> { let client_config = ConfigBuilder::new() .timeout(Some(config.request_timeout)) - .retry(0) + // TODO: Why is this set to 1? + // The goal of this crate is to extract retry logic out of the electrum client library + // and instead handle inside this crate. However, the electrum client library is quite inflexible. + // + // Setting it to 0 causes some bugs, see: https://github.com/bitcoindevkit/rust-electrum-client/issues/186 + .retry(1) .build(); let client = Client::from_config(url, client_config).map_err(|e| {