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

addrman: remove unreachable tried-collision branch

Public commit record

What the developer wrote

Authored by Bruno Garcia

85/100 · Strong
addrman: remove unreachable tried-collision branch

`ResolveCollisions_()` had a fallback for the case where a pending tried
collision no longer collided because the destination tried slot became
empty.

Under current addrman invariants this cannot happen: once an entry is
added to `m_tried_collisions`, the corresponding tried slot remains
occupied until the collision is resolved. The only other valid outcomes
are that the pending new entry disappears or becomes invalid, both of
which are already handled.

Remove the dead branch and replace the implicit assumption with
assertions in `ResolveCollisions_()` and `SelectTriedCollision_()`.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit removes a fallback code path in Bitcoin Core's address manager that the authors say can never be reached under current rules. It replaces that fallback with internal consistency checks (assertions). The change is a code-cleanup and hardening patch, not a fix for a known exploitable bug.

Recommended action

No immediate action required. Treat as routine hardening/refactoring. Reviewers may want to independently verify the claimed invariant that the tried slot cannot become empty while a collision is pending.

Security signals we found

01

Removal of purportedly unreachable branch in collision-resolution logic

02

Addition of Assume() assertions to enforce internal invariant

03

No change to network-facing behavior or data formats

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 2/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.