diff --git a/src/blockchain/esplora/mod.rs b/src/blockchain/esplora/mod.rs index 83c5c3d..30d29d6 100644 --- a/src/blockchain/esplora/mod.rs +++ b/src/blockchain/esplora/mod.rs @@ -209,4 +209,38 @@ mod test { "should inherit from value for 25" ); } + + #[test] + #[cfg(feature = "test-esplora")] + fn test_esplora_with_variable_configs() { + use crate::testutils::{ + blockchain_tests::TestClient, + configurable_blockchain_tests::ConfigurableBlockchainTester, + }; + + struct EsploraTester; + + impl ConfigurableBlockchainTester for EsploraTester { + const BLOCKCHAIN_NAME: &'static str = "Esplora"; + + fn config_with_stop_gap( + &self, + test_client: &mut TestClient, + stop_gap: usize, + ) -> Option { + Some(EsploraBlockchainConfig { + base_url: format!( + "http://{}", + test_client.electrsd.esplora_url.as_ref().unwrap() + ), + proxy: None, + concurrency: None, + stop_gap: stop_gap, + timeout: None, + }) + } + } + + EsploraTester.run(); + } } diff --git a/src/blockchain/esplora/ureq.rs b/src/blockchain/esplora/ureq.rs index 50493f9..7ce57a1 100644 --- a/src/blockchain/esplora/ureq.rs +++ b/src/blockchain/esplora/ureq.rs @@ -88,7 +88,7 @@ impl Blockchain for EsploraBlockchain { } fn broadcast(&self, tx: &Transaction) -> Result<(), Error> { - let _txid = self.url_client._broadcast(tx)?; + self.url_client._broadcast(tx)?; Ok(()) }