use cfg! instead of #[cfg] and use semver
This commit is contained in:
parent
f4ecfa0d49
commit
2ecae348ea
@ -69,7 +69,7 @@ test-md-docs = ["electrum"]
|
|||||||
lazy_static = "1.4"
|
lazy_static = "1.4"
|
||||||
env_logger = "0.7"
|
env_logger = "0.7"
|
||||||
clap = "2.33"
|
clap = "2.33"
|
||||||
electrsd = { version="0.4.0", features = ["trigger"] }
|
electrsd = { version="0.4", features = ["trigger"] }
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "address_validator"
|
name = "address_validator"
|
||||||
|
@ -26,10 +26,7 @@ impl TestClient {
|
|||||||
debug!("launching {} and {}", &bitcoind_exe, &electrs_exe);
|
debug!("launching {} and {}", &bitcoind_exe, &electrs_exe);
|
||||||
let bitcoind = BitcoinD::new(bitcoind_exe).unwrap();
|
let bitcoind = BitcoinD::new(bitcoind_exe).unwrap();
|
||||||
|
|
||||||
#[cfg(feature = "test-esplora")]
|
let http_enabled = cfg!(feature = "test-esplora");
|
||||||
let http_enabled = true;
|
|
||||||
#[cfg(not(feature = "test-esplora"))]
|
|
||||||
let http_enabled = false;
|
|
||||||
|
|
||||||
let electrsd = ElectrsD::new(electrs_exe, &bitcoind, false, http_enabled).unwrap();
|
let electrsd = ElectrsD::new(electrs_exe, &bitcoind, false, http_enabled).unwrap();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user