Skip to content

Commit b154398

Browse files
committed
fixup! Add end-to-end test for HRN resolution
Disale resolution service for unified_send_to_hrn test. This will ensure the first node sends a hrn payment using onion messaging while the second node is still able to use local resolution when sending to hrns.
1 parent 7d3ae68 commit b154398

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

tests/common/mod.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -322,38 +322,38 @@ pub(crate) use setup_builder;
322322

323323
pub(crate) fn setup_two_nodes(
324324
chain_source: &TestChainSource, allow_0conf: bool, anchor_channels: bool,
325-
anchors_trusted_no_reserve: bool, second_node_is_hrn_resolver: bool,
325+
anchors_trusted_no_reserve: bool, first_node_is_not_hrn_resolver: bool,
326326
) -> (TestNode, TestNode) {
327327
setup_two_nodes_with_store(
328328
chain_source,
329329
allow_0conf,
330330
anchor_channels,
331331
anchors_trusted_no_reserve,
332332
TestStoreType::TestSyncStore,
333-
second_node_is_hrn_resolver,
333+
first_node_is_not_hrn_resolver,
334334
)
335335
}
336336

337337
pub(crate) fn setup_two_nodes_with_store(
338338
chain_source: &TestChainSource, allow_0conf: bool, anchor_channels: bool,
339-
anchors_trusted_no_reserve: bool, store_type: TestStoreType, second_node_is_hrn_resolver: bool,
339+
anchors_trusted_no_reserve: bool, store_type: TestStoreType, first_node_is_not_hrn_resolver: bool,
340340
) -> (TestNode, TestNode) {
341341
println!("== Node A ==");
342342
let mut config_a = random_config(anchor_channels);
343343
config_a.store_type = store_type;
344+
345+
if first_node_is_not_hrn_resolver {
346+
config_a.node_config.hrn_config = Some(HumanReadableNamesConfig {
347+
client_resolution_config: HRNResolverConfig::Blip32Onion,
348+
disable_hrn_resolution_service: true,
349+
});
350+
}
344351
let node_a = setup_node(chain_source, config_a);
345352

346353
println!("\n== Node B ==");
347354
let mut config_b = random_config(anchor_channels);
348355
config_b.store_type = store_type;
349-
if second_node_is_hrn_resolver {
350-
config_b.node_config.hrn_config = Some(HumanReadableNamesConfig {
351-
client_resolution_config: HRNResolverConfig::LocalDns {
352-
dns_server_address: "8.8.8.8:53".to_string(),
353-
},
354-
disable_hrn_resolution_service: false,
355-
});
356-
}
356+
357357
if allow_0conf {
358358
config_b.node_config.trusted_peers_0conf.push(node_a.node_id());
359359
}

0 commit comments

Comments
 (0)