electrum: add validate_domain to ElectrumBlockchainConfig

This commit is contained in:
Igor Cota
2022-11-25 10:32:13 +01:00
parent 634a0575cb
commit 2451c00268
2 changed files with 7 additions and 1 deletions

View File

@@ -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 {
@@ -323,6 +325,7 @@ impl ConfigurableBlockchain for ElectrumBlockchain {
.retry(config.retry)
.timeout(config.timeout)?
.socks5(socks5)?
.validate_domain(config.validate_domain)
.build();
Ok(ElectrumBlockchain {
@@ -417,6 +420,7 @@ mod test {
retry: 0,
timeout: None,
stop_gap: stop_gap,
validate_domain: true,
})
}
}