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

test: protect outbound connection from eviction in getaddr_test

Public commit record

What the developer wrote

Authored by stratospher

100/100 · Strong
test: protect outbound connection from eviction in getaddr_test

since we're bumping mocktime more than CHAIN_SYNC_TIMEOUT = 20 * 60,
it's possible for disconnections like this to happen in the test:

$ test/functional/p2p_addr_relay.py --randomseed=7758649581790797022
...
TestFramework (INFO): Check that we answer getaddr messages only once per connection
TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:58829 due to [Errno 54] Connection reset by peer
...
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ 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 a flaky Bitcoin Core functional test. The test was sometimes failing because the node would disconnect an outbound peer after the test advanced its internal clock too far. The fix makes the test announce the latest block header to the peer, which tells the node to protect that peer from disconnection. It is purely a test change and does not affect real network behavior or user funds.

Recommended action

No security action needed. This is a test-only reliability improvement. Reviewers can verify the test passes deterministically with the referenced random seed and others.

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.