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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2026-01-07 09:46:11 +10:30
parent 97e58e41f6
commit 81a45b194b

View File

@@ -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)