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

pytest: add tests for bcli `getblockfrompeer` retry path

Public commit record

What the developer wrote

Authored by dovgopoly

83/100 · Strong
pytest: add tests for bcli `getblockfrompeer` retry path

Add `test_bcli_concurrent` to verify bcli handles concurrent requests while the `getblockfrompeer` retry path is active, simulating a pruned node scenario where `getblock` initially fails.

Add `test_bcli_retry_timeout` to verify lightningd crashes with a clear error message when we run out of `getblock` retries.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit only adds new automated tests to the Core Lightning project. It does not change any production code, so it cannot introduce a security vulnerability by itself. The tests exercise an existing retry mechanism in the bitcoin backend plugin (bcli) when a pruned Bitcoin node temporarily cannot return a block. One test documents that Core Lightning will shut down (fatal error) if the retry path runs out of time. That behavior is already present in the code; the test merely records it.

Recommended action

No security action required. Review the existing bcli retry/fatal logic separately if there is concern that crashing lightningd on retry timeout is too severe, but that is outside the scope of this commit.

Security signals we found

01

Test-only change; no production code modified

02

Tests cover existing retry/fatal behavior in bcli plugin

03

One test documents a fatal() path when retries are exhausted

Risk score

Why this scored 12/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 8/10
Evidence quality 4/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.