Add validate_domain option to ElectrumConfig
This commit is contained in:
parent
cdde26a8ea
commit
f399b799e4
5
Cargo.lock
generated
5
Cargo.lock
generated
@ -130,8 +130,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bdk"
|
||||
version = "0.26.0-rc.2"
|
||||
source = "git+https://github.com/bitcoindevkit/bdk?tag=v0.26.0-rc.2#7e8e9921a961367ae85d7df29e1cc5eb36fdd210"
|
||||
version = "0.26.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b238a07736baee43ba9663933e44b1c6c27b43ef871b9486e175902335d83880"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"async-trait",
|
||||
|
@ -120,6 +120,7 @@ data class SledDbConfiguration(
|
||||
* @property retry Request retry count.
|
||||
* @property timeout Request timeout (seconds).
|
||||
* @property stopGap Stop searching addresses for transactions after finding an unused gap of this length.
|
||||
* @property validateDomain Validate the domain when using SSL.
|
||||
*
|
||||
* @sample org.bitcoindevkit.electrumBlockchainConfigSample
|
||||
*/
|
||||
@ -128,7 +129,8 @@ data class ElectrumConfig(
|
||||
var socks5: String?,
|
||||
var retry: UByte,
|
||||
var timeout: UByte?,
|
||||
var stopGap: ULong
|
||||
var stopGap: ULong,
|
||||
var validateDomain: Boolean
|
||||
)
|
||||
|
||||
/**
|
||||
|
@ -10,8 +10,7 @@ crate-type = ["staticlib", "cdylib"]
|
||||
name = "bdkffi"
|
||||
|
||||
[dependencies]
|
||||
#bdk = { version = "0.26", features = ["all-keys", "use-esplora-ureq", "sqlite-bundled", "rpc"] }
|
||||
bdk = { git = "https://github.com/bitcoindevkit/bdk", tag = "v0.26.0-rc.2", features = ["all-keys", "use-esplora-ureq", "sqlite-bundled", "rpc"] }
|
||||
bdk = { version = "0.26", features = ["all-keys", "use-esplora-ureq", "sqlite-bundled", "rpc"] }
|
||||
uniffi_macros = { version = "0.21.0", features = ["builtin-bindgen"] }
|
||||
uniffi = { version = "0.21.0", features = ["builtin-bindgen"] }
|
||||
|
||||
|
@ -117,6 +117,7 @@ dictionary ElectrumConfig {
|
||||
u8 retry;
|
||||
u8? timeout;
|
||||
u64 stop_gap;
|
||||
boolean validate_domain;
|
||||
};
|
||||
|
||||
dictionary EsploraConfig {
|
||||
|
@ -118,6 +118,8 @@ pub struct ElectrumConfig {
|
||||
pub timeout: Option<u8>,
|
||||
/// Stop searching addresses for transactions after finding an unused gap of this length
|
||||
pub stop_gap: u64,
|
||||
/// Validate the domain when using SSL
|
||||
pub validate_domain: bool,
|
||||
}
|
||||
|
||||
/// Configuration for an EsploraBlockchain
|
||||
@ -268,6 +270,7 @@ impl Blockchain {
|
||||
timeout: config.timeout,
|
||||
url: config.url,
|
||||
stop_gap: usize::try_from(config.stop_gap).unwrap(),
|
||||
validate_domain: config.validate_domain,
|
||||
})
|
||||
}
|
||||
BlockchainConfig::Esplora { config } => {
|
||||
|
@ -38,7 +38,8 @@ class JvmLibTest {
|
||||
null,
|
||||
5u,
|
||||
null,
|
||||
100u
|
||||
100u,
|
||||
true,
|
||||
)
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user