#35624 test: cover addnode connection limit
https://github.com/bitcoin/bitcoin/pull/35624 · · +77/-0 in 2 files, 1 commits · labels: Tests · draft
Goal
- Prevent regressions in manual outbound peer limits
- Add explicit end-to-end test coverage for the addnode connection cap
Adds a new functional test `rpc_addnode_limits.py` that connects 9 reachable nodes via `addnode "add"` to verify that `getaddednodeinfo` tracks all 9 entries while active manual outbound connections stay capped at `MAX_ADDNODE_CONNECTIONS` (8). It also registers the test in `test_runner.py`.
Problem: Connection management lacked explicit end-to-end test coverage ensuring that manual outbound connections do not exceed `MAX_ADDNODE_CONNECTIONS`, leaving the limit vulnerable to silent regression (#28635).
Category: P2P (#48 of 65)
P3 · test coverage
- P3 because it verifies existing manual peer connection limits without fixing a bug
- Provides regression protection for connection limits to partially address #28635
Adds coverage verifying that active manual connections do not exceed MAX_ADDNODE_CONNECTIONS, partially addressing #28635. While useful for preventing regressions in peer limits, it tests static existing behavior without fixing an active bug or altering connection logic.
Membership: Tests connection management and manual outbound peer limits (MAX_ADDNODE_CONNECTIONS).
Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 1
Reviewability: Stale: Author silent
- Author silent for 79 days with open reviewer questions
The author has been inactive for 79 days, exceeding the 60-day threshold, with two reviewer questions left unanswered.
Author status: silent since 2026-06-30
Open concerns:
- sedited requested the author rewrite the description in their own words rather than using LLM-generated text.
- achow101 asked why the PR is currently marked as draft.
Agreement: Positive
- Concept approval but asked for PR description rewrite (sedited)
- Unanswered question on why the PR remains in draft state (achow101)
Concept ACK from sedited; queries regarding description and draft status remain unanswered
Reviewers have supported the concept without objections to the code, but the author has not responded to feedback on the description or draft state.
- sedited left a Concept ACK while noting the description appeared LLM-generated and asking for a rewrite.
- achow101 inquired why the PR is in draft.
Review verdicts (DrahtBot): 0
- Concept ACK: sedited
Dependencies
Enables:
- Partially addresses issue #28635
Files
77 lines under test/bench/ci.
- test/functional/rpc_addnode_limits.py +76/-0
- test/functional/test_runner.py +1/-0
Card
Adds functional test coverage verifying that active manual outbound connections stay capped at MAX_ADDNODE_CONNECTIONS (8) when more targets are added, addressing part of issue #28635. The test confirms that getaddednodeinfo tracks all targets while active connections do not exceed the limit. sedited gave a Concept ACK while asking for a non-LLM description, and achow101 asked why the PR was opened in draft. The author has been silent for 79 days, making the PR Stale.