What changed, and why it matters
This commit fixes a flaky test in the project's automated test suite. It adds a wait condition so that one test node has received network information about another node before the test checks database query results. There is no security issue here—just a timing problem in tests.
No security action needed. This is a routine test reliability fix; review and merge as normal.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies tests/test_plugin.py in the test_sql function. It inserts a wait_for() call ensuring l2 has a node_announcement for l1 (verified via listnodes returning a non-empty list) before executing an SQL query that expects a row with NULL option_will_fund_* columns. Previously, if the node_announcement had not propagated in time, the query returned zero rows, causing an intermittent assertion failure. This is a test-only synchronization fix.
Changed components
tests/test_plugin.pytest_sql integration testInspect captured patch +3 / −0
diff --git a/tests/test_plugin.py b/tests/test_plugin.py
index 3f862c2c..2e18c2d9 100644
--- a/tests/test_plugin.py
+++ b/tests/test_plugin.py
@@ -4021,6 +4021,9 @@ def test_sql(node_factory, bitcoind):
# Make sure l3 sees new channel
wait_for(lambda: len(l3.rpc.listchannels(scid)['channels']) == 2)
+ # Make sure we have a node_announcement for l1
+ wait_for(lambda: l2.rpc.listnodes(l1.info['id'])['nodes'] != [])
+
# This should create a forward through l2
l1.rpc.pay(l3.rpc.invoice(amount_msat=12300, label='inv1', description='description')['bolt11'])
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.