From 2ecae348ea864fb0e86bd706ba1f4b4a41d15636 Mon Sep 17 00:00:00 2001 From: Riccardo Casatta Date: Mon, 21 Jun 2021 13:56:09 +0200 Subject: [PATCH] use cfg! instead of #[cfg] and use semver --- Cargo.toml | 2 +- src/testutils/blockchain_tests.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 133c0a69..fb45a762 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,7 +69,7 @@ test-md-docs = ["electrum"] lazy_static = "1.4" env_logger = "0.7" clap = "2.33" -electrsd = { version="0.4.0", features = ["trigger"] } +electrsd = { version="0.4", features = ["trigger"] } [[example]] name = "address_validator" diff --git a/src/testutils/blockchain_tests.rs b/src/testutils/blockchain_tests.rs index 12f96dd9..a2174802 100644 --- a/src/testutils/blockchain_tests.rs +++ b/src/testutils/blockchain_tests.rs @@ -26,10 +26,7 @@ impl TestClient { debug!("launching {} and {}", &bitcoind_exe, &electrs_exe); let bitcoind = BitcoinD::new(bitcoind_exe).unwrap(); - #[cfg(feature = "test-esplora")] - let http_enabled = true; - #[cfg(not(feature = "test-esplora"))] - let http_enabled = false; + let http_enabled = cfg!(feature = "test-esplora"); let electrsd = ElectrsD::new(electrs_exe, &bitcoind, false, http_enabled).unwrap();