{
 "number": 35624,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/35624",
 "title": "test: cover addnode connection limit",
 "author": "beihaili",
 "author_association": "NONE",
 "created_at": "2026-06-30T07:02:14Z",
 "updated_at": "2026-07-23T19:39:52Z",
 "age_days": 79,
 "draft": true,
 "labels": [
  "Tests"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "3be5ceeee745fa29a9b3386f5ba6e94596efdb8a",
 "head_ref": "codex/28635-addnode-limit-test",
 "head_repo": "beihaili/bitcoin",
 "head_history": [],
 "additions": 77,
 "deletions": 0,
 "changed_files": 2,
 "commit_count": 1,
 "size_bucket": "S",
 "mergeable_state": "unknown",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "concept_ack": [
     {
      "login": "sedited",
      "url": "https://github.com/bitcoin/bitcoin/pull/35624#issuecomment-4845052985"
     }
    ]
   },
   "conflicts": []
  }
 },
 "acks_parsed": {
  "sedited": {
   "kind": "concept_ack",
   "hash": null,
   "t": "2026-06-30T15:10:08Z",
   "stale": false
  }
 },
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 1,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "achow101",
   "sedited"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "unknown",
  "last_author_activity": "2026-06-30T06:50:46Z",
  "last_reviewer_activity": "2026-07-23T19:39:48Z",
  "last_reviewer": "achow101",
  "author_silent_days": 79,
  "waiting_on_author_days": 55,
  "days_since_update": 55
 },
 "refs": {
  "mentioned": [
   28635
  ],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [
   {
    "number": 28635,
    "type": "issue",
    "state": "open",
    "merged": false,
    "merged_at": null,
    "title": "Test calling addnode more than once (and MAX_ADDNODE_CONNECTIONS)"
   }
  ],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [],
 "body": "This PR adds functional test coverage for the MAX_ADDNODE_CONNECTIONS part of #28635.\n\nThe issue also discusses a separate double-addnode / ThreadOpenAddedConnections timing problem. This PR does not try to cover that case. I kept this test focused on the connection limit because it can be checked through RPC behavior without mocking the networking thread timing.\n\nThe test starts node0 and 9 reachable target nodes. node0 adds all 9 targets with addnode \"add\". It then checks that getaddednodeinfo() records 9 added nodes, while getpeerinfo() shows no more than 8 manual outbound connections. It also checks the count over a short stability window.\n\nSo the behavior covered here is: Bitcoin Core may remember more than 8 added nodes, but active addnode/manual outbound connections are capped by MAX_ADDNODE_CONNECTIONS.\n\nTested locally:\n- `python3 -m py_compile test/functional/rpc_addnode_limits.py`\n- `test/functional/rpc_addnode_limits.py --configfile=build-clang/test/config.ini`\n- `test/functional/rpc_net.py --configfile=build-clang/test/config.ini`\n- `git diff --check`",
 "commits": [
  {
   "sha": "3be5ceeee745fa29a9b3386f5ba6e94596efdb8a",
   "date": "2026-06-30T06:50:46Z",
   "message": "test: cover addnode connection limit"
  }
 ],
 "timeline": [
  {
   "t": "2026-06-30T15:10:08Z",
   "kind": "comment",
   "who": "sedited",
   "assoc": "CONTRIBUTOR",
   "text": "Concept ACK\n\nYour pull request description looks like it was generated by an LLM. Please completely write it in your own words to demonstrate to potential reviewers that you understand the changes proposed here."
  },
  {
   "t": "2026-07-23T19:39:48Z",
   "kind": "comment",
   "who": "achow101",
   "assoc": "MEMBER",
   "text": "Is there a reason for this to be in draft?"
  }
 ],
 "labels_log": [
  {
   "t": "2026-06-30T07:02:18Z",
   "action": "labeled",
   "label": "Tests",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 1407,
 "text_tokens_estimate": 351,
 "changed_paths": [
  "test/functional/rpc_addnode_limits.py",
  "test/functional/test_runner.py"
 ],
 "files": [
  {
   "path": "test/functional/rpc_addnode_limits.py",
   "add": 76,
   "del": 0
  },
  {
   "path": "test/functional/test_runner.py",
   "add": 1,
   "del": 0
  }
 ],
 "test_lines": 77,
 "git": {
  "head": "3be5ceeee745fa29a9b3386f5ba6e94596efdb8a",
  "head_matches_backup": true,
  "base": "3c76bd435681ee2ebaa1f407ac23736d9c3b331b",
  "commits": [
   {
    "sha": "3be5ceeee7",
    "subject": "test: cover addnode connection limit",
    "files": 2,
    "add": 77,
    "del": 0
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "d0028df95a49b4f7",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}