pytest: fix real reason for warning issue in test_route_by_old_scid.
What changed, and why it matters
This commit only changes a test file to suppress a harmless warning during automated testing. It does not change any production code, so it cannot affect real users or funds.
No security action needed. This is a test-only reliability fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies tests/test_splicing.py in Core Lightning. It adds allow_warning=True for node l1 in test_route_by_old_scid and removes a wait_for call that was intended to avoid a gossip warning. The warning itself is normal behavior after a splice: l2 forgets the pre-splice short channel ID and emits a WIRE_WARNING when l1 mentions it. The change makes the test tolerate that warning instead of trying to prevent it. No daemon, protocol, or cryptographic code is changed.
Changed components
tests/test_splicing.pyInspect captured patch +7 / −6
diff --git a/tests/test_splicing.py b/tests/test_splicing.py
index 966c75f6..e5a3565b 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)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.