Skip to content

Commit 7da413c

Browse files
Test utils: fix config overrides for private channels
Previously, this test util did not account for config overrides supplied at node creation time. Uncovered because it caused test nodes to be unable to forward over private channels created with this util because that is not the default.
1 parent b469327 commit 7da413c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/functional_test_utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,7 @@ pub fn create_announced_chan_between_nodes_with_value<'a, 'b, 'c: 'd, 'd>(nodes:
15071507
}
15081508

15091509
pub fn create_unannounced_chan_between_nodes_with_value<'a, 'b, 'c, 'd>(nodes: &'a Vec<Node<'b, 'c, 'd>>, a: usize, b: usize, channel_value: u64, push_msat: u64) -> (msgs::ChannelReady, Transaction) {
1510-
let mut no_announce_cfg = test_default_channel_config();
1510+
let mut no_announce_cfg = nodes[a].node.get_current_default_configuration().clone();
15111511
no_announce_cfg.channel_handshake_config.announce_for_forwarding = false;
15121512
nodes[a].node.create_channel(nodes[b].node.get_our_node_id(), channel_value, push_msat, 42, None, Some(no_announce_cfg)).unwrap();
15131513
let open_channel = get_event_msg!(nodes[a], MessageSendEvent::SendOpenChannel, nodes[b].node.get_our_node_id());

0 commit comments

Comments
 (0)