Skip to content

Commit 9f61b6e

Browse files
committed
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 <[email protected]>
1 parent 4fbff64 commit 9f61b6e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/test_splicing.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,13 @@ def test_splice_stuck_htlc(node_factory, bitcoind, executor):
501501

502502
@unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need')
503503
def test_route_by_old_scid(node_factory, bitcoind):
504-
l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True, opts={'experimental-splicing': None, 'may_reconnect': True})
504+
opts = {'experimental-splicing': None, 'may_reconnect': True}
505+
# l1 sometimes talks about pre-splice channels. l2 (being part of the splice) immediately forgets
506+
# the old scid and uses the new one, then complains when l1 talks about it. Which is fine, but
507+
# breaks CI.
508+
l1opts = opts.copy()
509+
l1opts['allow_warning'] = True
510+
l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True, opts=[l1opts, opts, opts])
505511

506512
# Get pre-splice route.
507513
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):
527533
l1.rpc.sendpay(route, inv['payment_hash'], payment_secret=inv['payment_secret'])
528534
l1.rpc.waitsendpay(inv['payment_hash'])
529535

530-
# Make sure l1 has seen and processed announcement for new splice
531-
# scid, otherwise we can get gossip warning here (which breaks CI) if we splice again.
532-
scid = only_one(l3.rpc.listchannels(source=l3.info['id'])['channels'])['short_channel_id']
533-
wait_for(lambda: l1.rpc.listchannels(short_channel_id=scid)['channels'] != [])
534-
535536
# Let's splice again, so the original scid is two behind the times.
536537
l3.fundwallet(200000)
537538
funds_result = l3.rpc.fundpsbt("109000sat", "slow", 166, excess_as_change=True)

0 commit comments

Comments
 (0)