Skip to content

Commit 74c9e6a

Browse files
committed
Prevent other tests from failing
1 parent c6a7bde commit 74c9e6a

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

tests/common/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,13 @@ pub(crate) fn random_node_alias() -> Option<NodeAlias> {
294294
pub(crate) fn random_config(anchor_channels: bool) -> TestConfig {
295295
let mut node_config = Config::default();
296296

297+
if !cfg!(hrn_tests) {
298+
node_config.hrn_config.resolution_config = HRNResolverConfig::Dns {
299+
dns_server_address: "8.8.8.8:53".to_string(),
300+
enable_hrn_resolution_service: false,
301+
};
302+
}
303+
297304
if !anchor_channels {
298305
node_config.anchor_channels_config = None;
299306
}

tests/integration_tests_rust.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use common::{
2828
};
2929
use electrsd::corepc_node::Node as BitcoinD;
3030
use electrsd::ElectrsD;
31-
use ldk_node::config::{AsyncPaymentsRole, EsploraSyncConfig};
31+
use ldk_node::config::{AsyncPaymentsRole, Config, EsploraSyncConfig, HRNResolverConfig};
3232
use ldk_node::entropy::NodeEntropy;
3333
use ldk_node::liquidity::LSPS2ServiceConfig;
3434
use ldk_node::payment::{
@@ -2520,11 +2520,17 @@ async fn do_persistence_backwards_compatibility(version: OldLdkVersion) {
25202520
},
25212521
};
25222522

2523+
let mut config = Config::default();
2524+
config.hrn_config.resolution_config = HRNResolverConfig::Dns {
2525+
dns_server_address: "8.8.8.8:53".to_string(),
2526+
enable_hrn_resolution_service: false,
2527+
};
2528+
25232529
// Now ensure we can still reinit from the same backend.
25242530
#[cfg(feature = "uniffi")]
2525-
let builder_new = Builder::new();
2531+
let builder_new = Builder::from_config(config);
25262532
#[cfg(not(feature = "uniffi"))]
2527-
let mut builder_new = Builder::new();
2533+
let mut builder_new = Builder::from_config(config);
25282534
builder_new.set_network(bitcoin::Network::Regtest);
25292535
builder_new.set_storage_dir_path(storage_path);
25302536
builder_new.set_chain_source_esplora(esplora_url, None);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Seeds for failure cases proptest has generated in the past. It is
2+
# automatically read and these particular cases re-run before any
3+
# novel cases are generated.
4+
#
5+
# It is recommended to check this file in to source control so that
6+
# everyone who runs the test benefits from these saved cases.
7+
cc a3d8f1349d59a951dc839159f40acfa828065f2b0495e25e32d2e1b3d0a60b76 # shrinks to reorg_depth = 2, force_close = true

0 commit comments

Comments
 (0)