Skip to content

Commit 1568097

Browse files
committed
Tweak test_unconf_chan to test that we don't prematurely close
1 parent 7016c2f commit 1568097

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lightning/src/ln/reorg_tests.rs

+8
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ fn do_test_unconf_chan(reload_node: bool, reorg_after_reload: bool, use_funding_
209209
let relevant_txids = nodes[0].node.get_relevant_txids();
210210
assert_eq!(&relevant_txids[..], &[chan.3.txid()]);
211211
nodes[0].node.transaction_unconfirmed(&relevant_txids[0]);
212+
} else if connect_style == ConnectStyle::FullBlockViaListen {
213+
disconnect_blocks(&nodes[0], CHAN_CONFIRM_DEPTH - 1);
214+
assert_eq!(nodes[0].node.list_usable_channels().len(), 1);
215+
disconnect_blocks(&nodes[0], 1);
212216
} else {
213217
disconnect_all_blocks(&nodes[0]);
214218
}
@@ -273,6 +277,10 @@ fn do_test_unconf_chan(reload_node: bool, reorg_after_reload: bool, use_funding_
273277
let relevant_txids = nodes[0].node.get_relevant_txids();
274278
assert_eq!(&relevant_txids[..], &[chan.3.txid()]);
275279
nodes[0].node.transaction_unconfirmed(&relevant_txids[0]);
280+
} else if connect_style == ConnectStyle::FullBlockViaListen {
281+
disconnect_blocks(&nodes[0], CHAN_CONFIRM_DEPTH - 1);
282+
assert_eq!(nodes[0].node.list_channels().len(), 1);
283+
disconnect_blocks(&nodes[0], 1);
276284
} else {
277285
disconnect_all_blocks(&nodes[0]);
278286
}

0 commit comments

Comments
 (0)