Permit to not set timeout in ElectrumBlockchainConfig
Allowing to use socks5 which requires None timeout
This commit is contained in:
parent
8510b2b86e
commit
2b669afd3e
@ -22,7 +22,7 @@ rand = "^0.7"
|
|||||||
|
|
||||||
# Optional dependencies
|
# Optional dependencies
|
||||||
sled = { version = "0.34", optional = true }
|
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"] }
|
reqwest = { version = "0.10", optional = true, features = ["json"] }
|
||||||
futures = { version = "0.3", optional = true }
|
futures = { version = "0.3", optional = true }
|
||||||
async-trait = { version = "0.1", optional = true }
|
async-trait = { version = "0.1", optional = true }
|
||||||
|
@ -168,7 +168,7 @@ pub struct ElectrumBlockchainConfig {
|
|||||||
/// Request retry count
|
/// Request retry count
|
||||||
pub retry: u8,
|
pub retry: u8,
|
||||||
/// Request timeout (seconds)
|
/// Request timeout (seconds)
|
||||||
pub timeout: u8,
|
pub timeout: Option<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ConfigurableBlockchain for ElectrumBlockchain {
|
impl ConfigurableBlockchain for ElectrumBlockchain {
|
||||||
@ -178,8 +178,8 @@ impl ConfigurableBlockchain for ElectrumBlockchain {
|
|||||||
let socks5 = config.socks5.as_ref().map(Socks5Config::new);
|
let socks5 = config.socks5.as_ref().map(Socks5Config::new);
|
||||||
let electrum_config = ConfigBuilder::new()
|
let electrum_config = ConfigBuilder::new()
|
||||||
.retry(config.retry)
|
.retry(config.retry)
|
||||||
.socks5(socks5)?
|
|
||||||
.timeout(config.timeout)?
|
.timeout(config.timeout)?
|
||||||
|
.socks5(socks5)?
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
Ok(ElectrumBlockchain(Client::from_config(
|
Ok(ElectrumBlockchain(Client::from_config(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user