AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

tests: fix races in test_channel_lease_unilat_closes

Public commit record

What the developer wrote

Authored by daywalker90

95/100 · Strong
tests: fix races in test_channel_lease_unilat_closes

CI flaked with:

> assert l3blocks == 4032 - 6 - 2 - 1
E assert 4025 == (((4032 - 6) - 2) - 1)

l3's commitment used a blockheight 2 blocks behind the chain, because
l2 was stopped before l3 had saved a commitment with the new height.
A second run flaked with:

E pyln.client.lightning.RpcError: RPC call failed: method: fundchannel
... error: {'code': 301, 'message': 'Could not afford 506268sat using
all 0 available UTXOs: 506696sat short'}

l2 broadcast the l1 funding tx, but did not record its change output
until after the l2->l3 fundchannel with minconf=0 had already failed.

Wait for l3 to log the commitsig carrying the new blockheight before
stopping l2, and wait for l2 to see the funding change before the
minconf=0 fundchannel.

Changelog-None
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes timing problems in a single automated test. It adds waits so the test nodes are fully synchronized before the test proceeds. There is no change to production code, no security bug, and no real-world attack possibility.

Recommended action

No security action needed. Treat as a normal test-stability improvement.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.