#36279 test: non-inbound version message promotes address to tried table

full analysis

https://github.com/bitcoin/bitcoin/pull/36279 · naiyoma · +63/-0 in 1 files, 1 commits · labels: Tests

Goal

  • Prevent regressions that could allow inbound peers to promote their addresses into the tried table
  • Ensure only non-inbound peers get promoted upon receiving a VERSION message

Adds a unit test in net_tests.cpp checking that only non-inbound peers have their address moved from the new table to the tried table in AddrMan upon receiving a VERSION message. Inbound peers are tested to ensure their addresses remain in the new table.

Problem: AddrMan address promotion on VERSION messages was untested against mutations, leaving room for regressions that could allow inbound peers to populate the tried table.

Category: P2P (#62 of 65)

P3 · test coverage

  • P3 because it locks down an eclipse-mitigation invariant for peer address management
  • Kills an untested mutation in network message processing without fixing an active bug

Pins an important eclipse-mitigation invariant where inbound connections are forbidden from promoting themselves into the tried table via AddrMan::Good(). The PR kills an untested mutation in net_processing without fixing an active bug.

Membership: Tests address management (AddrMan) and peer connection handling in net_processing.

Factors: security/stability 1, bug 0, performance 0, user value 0, leverage 0

Reviewability: Ready

  • Ready for review
  • Clean diff with passing CI and no blocking dependencies

Clean diff with no conflicts, passing CI, and no blocking dependencies.

Author status: active

Agreement: Crickets

  • No reviewer feedback yet

No reviewer feedback yet

The PR was just opened and has received no reviews or comments.

Review verdicts (DrahtBot): 0

Files

63 lines under test/bench/ci.

  • src/test/net_tests.cpp +63/-0

Card

Adds unit test coverage in net_tests verifying that AddrMan::Good() moves an address to the tried table only for non-inbound peers upon receiving a VERSION message. This validates an address management behavior important for eclipse resistance and eliminates a mutation in net_processing. The PR is self-contained and clean with no reviews yet.

Data

dossier JSON · extract JSON · model openrouter/google/gemini-3.8-flash, generated 2026-09-17T15:59, confidence high, input hash 7596a76e0463be13