Skip to content

Commit 3e67915

Browse files
committed
pytest: fix flake in test_splicing_rbf
We get a unilateral close if the blocks come too fast: ``` > l2.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL') tests/test_splicing.py:96: ... > raise TimeoutError('Unable to find "{}" in logs.'.format(exs)) E TimeoutError: Unable to find "[re.compile('CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')]" in logs. ``` Here: ``` lightningd-2 2025-07-08T12:08:30.430Z DEBUG lightningd: Adding block 114: 542499dfc63bc94c0ba0a3d81bdaff07ab73ba9aebddd4c2ae4b2e0c1e8bd15f ... lightningd-2 2025-07-08T12:08:30.459Z UNUSUAL 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-chan#1: Peer permanent failure in CHANNELD_AWAITING_SPLICE: Fulfilled HTLC 1 RCVD_REMOVE_REVOCATION cltv11 4 hit deadline (reason=protocol) lightningd-2 2025-07-08T12:08:30.469Z DEBUG 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-channeld-chan#1: Status closed, but not exited. Killing lightningd-2 2025-07-08T12:08:30.475Z INFO 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-chan#1: State changed from CHANNELD_AWAITING_SPLICE to AWAITING_UNILATERAL ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent 34cf333 commit 3e67915

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_splicing.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ def test_splice_rbf(node_factory, bitcoind):
9191
inv = l2.rpc.invoice(10**2, '2', 'no_2')
9292
l1.rpc.pay(inv['bolt11'])
9393

94+
# Make sure l1 doesn't unilateral close if HTLC hasn't completely settled before deadline.
95+
wait_for(lambda: only_one(l1.rpc.listpeerchannels()['channels'])['htlcs'] == [])
96+
9497
bitcoind.generate_block(6, wait_for_mempool=1)
9598

9699
l2.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')

0 commit comments

Comments
 (0)