Skip to content

Commit 5bab80f

Browse files
committed
Fix a panic-while-panic'ing error where we fail drop checks
In `bolt2_open_channel_sending_node_checks_part1`, when we drop `nodes[1]` after `create_channel` panics, we fail the no-pending-messages test as it as an expeted `accept_channel` in its outbound buffer. This avoids that by fetching the `accept_channel` before we go into the panic'ing `create_channel` call.
1 parent b4fc67c commit 5bab80f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lightning/src/ln/functional_tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5927,6 +5927,7 @@ fn bolt2_open_channel_sending_node_checks_part1() { //This test needs to be on i
59275927
nodes[0].node.create_channel(nodes[1].node.get_our_node_id(), channel_value_satoshis, push_msat, 42, None).unwrap();
59285928
let node0_to_1_send_open_channel = get_event_msg!(nodes[0], MessageSendEvent::SendOpenChannel, nodes[1].node.get_our_node_id());
59295929
nodes[1].node.handle_open_channel(&nodes[0].node.get_our_node_id(), InitFeatures::known(), &node0_to_1_send_open_channel);
5930+
get_event_msg!(nodes[1], MessageSendEvent::SendAcceptChannel, nodes[0].node.get_our_node_id());
59305931

59315932
// Create a second channel with the same random values. This used to panic due to a colliding
59325933
// channel_id, but now panics due to a colliding outbound SCID alias.

0 commit comments

Comments
 (0)