pytest: remove test_lockup_drain.
What changed, and why it matters
This commit simply deletes a flaky automated test from the test suite. The test was checking a specific edge case in fee handling, but the developers say the software now prevents that situation from occurring, so the test no longer works. There is no code change to the actual lightning node software itself—only a test file was modified.
No security action needed. This is routine test maintenance. If investigating historical behavior, the deleted test can be retrieved from git history for reference, but it should not be treated as an indicator of an unpatched vulnerability.
Security signals we found
No production code modified
Only test code removed
Commit message frames removal as test obsolescence, not a security fix
No patch, mitigation, or vulnerability description present
Evidence from the diff
The commit removes test_lockup_drain from tests/test_pay.py. The test exercised a channel state where the opener could not afford fees for an additional HTLC, preventing the peer from adding an HTLC. The commit message states that the codebase now tests whether the remote side would enter this state and prevents it, making the test obsolete. No production code was changed.
Changed components
tests/test_pay.pyInspect captured patch +0 / −25
diff --git a/tests/test_pay.py b/tests/test_pay.py
index 48abcb31..94ee2c0a 100644
--- a/tests/test_pay.py
+++ b/tests/test_pay.py
@@ -2821,31 +2821,6 @@ def test_channel_spendable_receivable_capped(node_factory, bitcoind):
assert l2.rpc.listpeerchannels()['channels'][0]['receivable_msat'] == Millisatoshi(0xFFFFFFFF)
-@unittest.skipIf(True, "Test is extremely flaky")
-def test_lockup_drain(node_factory, bitcoind):
- """Try to get channel into a state where opener can't afford fees on additional HTLC, so peer can't add HTLC"""
- l1, l2 = node_factory.line_graph(2, opts={'may_reconnect': True})
-
- # l1 sends all the money to l2 until even 1 msat can't get through.
- total = l1.drain(l2)
-
- # Even if feerate now increases 2x (30000), l2 should be able to send
- # non-dust HTLC to l1.
- l1.force_feerates(30000)
- l2.pay(l1, total // 2)
-
- # reset fees and send all back again
- l1.force_feerates(15000)
- l1.drain(l2)
-
- # But if feerate increase just a little more, l2 should not be able to send
- # non-fust HTLC to l1
- l1.force_feerates(30002) # TODO: Why does 30001 fail? off by one in C code?
- wait_for(lambda: l1.rpc.listpeers()['peers'][0]['connected'])
- with pytest.raises(RpcError, match=r".*Capacity exceeded.*"):
- l2.pay(l1, total // 2)
-
-
@unittest.skipIf(TEST_NETWORK != 'regtest', 'Assumes anchors')
def test_htlc_too_dusty_outgoing(node_factory, bitcoind, chainparams):
""" Try to hit the 'too much dust' limit, should fail the HTLC """
Why this scored 11/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.