diff --git a/src/bitcoin/d/mod.rs b/src/bitcoin/d/mod.rs index af282dcc..2d917fc7 100644 --- a/src/bitcoin/d/mod.rs +++ b/src/bitcoin/d/mod.rs @@ -245,7 +245,7 @@ impl BitcoinD { sendonly_client, watchonly_client, watchonly_wallet_path, - retries: 0, + retries: BITCOIND_RETRY_LIMIT, }) } @@ -270,12 +270,6 @@ impl BitcoinD { Ok(()) } - /// Set how many times we'll retry a failed request. If passed None will set to default. - pub fn with_retry_limit(mut self, retry_limit: Option) -> Self { - self.retries = retry_limit.unwrap_or(BITCOIND_RETRY_LIMIT); - self - } - /// Wrapper to retry a request sent to bitcoind upon IO failure /// according to the configured number of retries. fn retry Result>( diff --git a/src/lib.rs b/src/lib.rs index 5a411824..a2cb7319 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -207,7 +207,7 @@ fn setup_bitcoind( bitcoind.sanity_check(&config.main_descriptor, config.bitcoin_config.network)?; log::info!("Connection to bitcoind established and checked."); - Ok(bitcoind.with_retry_limit(None)) + Ok(bitcoind) } #[derive(Clone)]