Skip to content

Commit ad11e08

Browse files
committed
pytest: avoid bad gossip flake in test_htlc_no_force_close
l3 closes with l2 unilaterally, but l2 sends l1 the channel_announce after that, when it has never seen it before. The solution is to wait until l1 has seen the channel before we start the rest of the test: ``` E ValueError: E Node errors: E - lightningd-2: had warning messages E - lightningd-1: had bad gossip messages ... lightningd-2 2025-07-09T07:55:59.778Z DEBUG 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-connectd: peer_in WIRE_WARNING lightningd-2 2025-07-09T07:55:59.778Z INFO 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 103x1x0 lightningd-1 2025-07-09T07:55:59.781Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-channeld-chan#1: billboard: Channel ready for use. lightningd-1 2025-07-09T07:55:59.782Z TRACE gossipd: channel_announcement: got reply for 103x1x0... lightningd-1 2025-07-09T07:55:59.782Z TRACE 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-gossipd: Bad gossip order: channel_announcement: no unspent txout 103x1x0 ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent 19ae86f commit ad11e08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_closing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3882,7 +3882,7 @@ def test_htlc_no_force_close(node_factory, bitcoind, anchors):
38823882
for opt in opts:
38833883
opt['dev-force-features'] = "-23"
38843884

3885-
l1, l2, l3 = node_factory.line_graph(3, opts=opts)
3885+
l1, l2, l3 = node_factory.line_graph(3, opts=opts, wait_for_announce=True)
38863886

38873887
MSATS = 12300000
38883888
inv = l3.rpc.invoice(MSATS, 'label', 'description')

0 commit comments

Comments
 (0)