From 81a45b194b44039ed0b6f396fc0f581720d2f055 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 7 Jan 2026 09:46:11 +1030 Subject: [PATCH] pytest: fix real reason for warning issue in test_route_by_old_scid. We can still get a warning: lightningd-1 2025-12-10T01:11:07.232Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 109x1x1 This has nothing to do with l1 talking about the original channel (which would be 103x1x): it's because l2's gossipd (being the node which does the splice) immediately forgets the pre-splice id. If l1 sends some gossip, it will get a warning message. Signed-off-by: Rusty Russell --- tests/test_splicing.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/test_splicing.py b/tests/test_splicing.py index 966c75f64..e5a3565b1 100644 --- a/tests/test_splicing.py +++ b/tests/test_splicing.py @@ -501,7 +501,13 @@ def test_splice_stuck_htlc(node_factory, bitcoind, executor): @unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need') def test_route_by_old_scid(node_factory, bitcoind): - l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True, opts={'experimental-splicing': None, 'may_reconnect': True}) + opts = {'experimental-splicing': None, 'may_reconnect': True} + # l1 sometimes talks about pre-splice channels. l2 (being part of the splice) immediately forgets + # the old scid and uses the new one, then complains when l1 talks about it. Which is fine, but + # breaks CI. + l1opts = opts.copy() + l1opts['allow_warning'] = True + l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True, opts=[l1opts, opts, opts]) # Get pre-splice route. inv = l3.rpc.invoice(10000000, 'test_route_by_old_scid', 'test_route_by_old_scid') @@ -527,11 +533,6 @@ def test_route_by_old_scid(node_factory, bitcoind): l1.rpc.sendpay(route, inv['payment_hash'], payment_secret=inv['payment_secret']) l1.rpc.waitsendpay(inv['payment_hash']) - # Make sure l1 has seen and processed announcement for new splice - # scid, otherwise we can get gossip warning here (which breaks CI) if we splice again. - scid = only_one(l3.rpc.listchannels(source=l3.info['id'])['channels'])['short_channel_id'] - wait_for(lambda: l1.rpc.listchannels(short_channel_id=scid)['channels'] != []) - # Let's splice again, so the original scid is two behind the times. l3.fundwallet(200000) funds_result = l3.rpc.fundpsbt("109000sat", "slow", 166, excess_as_change=True)