Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/blockchain/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ impl_from!(boxed rpc::RpcBlockchain, AnyBlockchain, Rpc, #[cfg(feature = "rpc")]
/// "type" : "electrum",
/// "url" : "ssl://electrum.blockstream.info:50002",
/// "retry": 2,
/// "stop_gap": 20
/// "stop_gap": 20,
/// "validate_domain": true
/// }"#,
/// )
/// .unwrap();
Expand All @@ -190,6 +191,7 @@ impl_from!(boxed rpc::RpcBlockchain, AnyBlockchain, Rpc, #[cfg(feature = "rpc")]
/// socks5: None,
/// timeout: None,
/// stop_gap: 20,
/// validate_domain: true,
/// })
/// );
/// # }
Expand Down
4 changes: 4 additions & 0 deletions src/blockchain/electrum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ pub struct ElectrumBlockchainConfig {
pub timeout: Option<u8>,
/// Stop searching addresses for transactions after finding an unused gap of this length
pub stop_gap: usize,
/// Validate the domain when using SSL
pub validate_domain: bool,
}

impl ConfigurableBlockchain for ElectrumBlockchain {
Expand All @@ -323,6 +325,7 @@ impl ConfigurableBlockchain for ElectrumBlockchain {
.retry(config.retry)
.timeout(config.timeout)?
.socks5(socks5)?
.validate_domain(config.validate_domain)
.build();

Ok(ElectrumBlockchain {
Expand Down Expand Up @@ -417,6 +420,7 @@ mod test {
retry: 0,
timeout: None,
stop_gap: stop_gap,
validate_domain: true,
})
}
}
Expand Down