From 2b669afd3ecf46851d8f6088b6d9eb0e3a6d2103 Mon Sep 17 00:00:00 2001 From: Riccardo Casatta Date: Mon, 11 Jan 2021 11:37:34 +0100 Subject: [PATCH] Permit to not set timeout in ElectrumBlockchainConfig Allowing to use socks5 which requires None timeout --- Cargo.toml | 2 +- src/blockchain/electrum.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c4cccea3..b4f392f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ rand = "^0.7" # Optional dependencies sled = { version = "0.34", optional = true } -electrum-client = { version = "0.4.0-beta.1", optional = true } +electrum-client = { version = "0.5.0-beta.1", optional = true } reqwest = { version = "0.10", optional = true, features = ["json"] } futures = { version = "0.3", optional = true } async-trait = { version = "0.1", optional = true } diff --git a/src/blockchain/electrum.rs b/src/blockchain/electrum.rs index 0d35c37e..65af45fc 100644 --- a/src/blockchain/electrum.rs +++ b/src/blockchain/electrum.rs @@ -168,7 +168,7 @@ pub struct ElectrumBlockchainConfig { /// Request retry count pub retry: u8, /// Request timeout (seconds) - pub timeout: u8, + pub timeout: Option, } impl ConfigurableBlockchain for ElectrumBlockchain { @@ -178,8 +178,8 @@ impl ConfigurableBlockchain for ElectrumBlockchain { let socks5 = config.socks5.as_ref().map(Socks5Config::new); let electrum_config = ConfigBuilder::new() .retry(config.retry) - .socks5(socks5)? .timeout(config.timeout)? + .socks5(socks5)? .build(); Ok(ElectrumBlockchain(Client::from_config(