{
 "number": 36547,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36547",
 "title": "test: return typed P2PInterface from add_p2p_connection helpers",
 "author": "ViniciusCestarii",
 "author_association": "CONTRIBUTOR",
 "created_at": "2026-10-15T22:41:50Z",
 "updated_at": "2026-10-20T22:06:28Z",
 "description_hash": "58863c31196485d1",
 "age_days": 17,
 "draft": false,
 "labels": [
  "Tests"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "b08c7da4d19cf259f86a7b91a473fb6014f19eb0",
 "head_ref": "typed-p2p-connection",
 "head_repo": "ViniciusCestarii/bitcoin",
 "head_history": [
  {
   "t": "2026-10-20T10:03:10Z",
   "sha": "b08c7da4d19cf259f86a7b91a473fb6014f19eb0"
  }
 ],
 "additions": 28,
 "deletions": 3,
 "changed_files": 1,
 "commit_count": 1,
 "size_bucket": "S",
 "mergeable_state": "clean",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "ack": [
     {
      "login": "tumutech",
      "url": "https://github.com/bitcoin/bitcoin/pull/36547#issuecomment-6302833241"
     }
    ],
    "concept_ack": [
     {
      "login": "fanquake",
      "url": "https://github.com/bitcoin/bitcoin/pull/36547#issuecomment-6208147624"
     }
    ]
   },
   "conflicts": []
  }
 },
 "acks_parsed": {
  "fanquake": {
   "kind": "concept_ack",
   "hash": null,
   "t": "2026-10-16T04:33:39Z",
   "stale": false
  },
  "tumutech": {
   "kind": "ack",
   "hash": "b08c7da4d19cf259f86a7b91a473fb6014f19eb0",
   "t": "2026-10-20T22:06:23Z",
   "stale": false
  }
 },
 "acks_tally": {
  "ack": 1,
  "stale_ack": 0,
  "concept_ack": 1,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 1,
  "changes_requested": 0,
  "distinct_reviewers": [
   "fanquake",
   "maflcko",
   "tumutech"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "clean",
  "last_author_activity": "2026-10-20T10:08:59Z",
  "last_reviewer_activity": "2026-10-20T22:06:23Z",
  "last_reviewer": "tumutech",
  "author_silent_days": 12,
  "waiting_on_author_days": 12,
  "days_since_update": 12
 },
 "refs": {
  "mentioned": [],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "test/functional/test_framework/test_node.py"
 ],
 "body": "Return type of add_p2p_connection and add_outbound_p2p_connection is not explicitly typed so LSPs treats the return as Any.\n\nAdd explicit return type to improve DX.",
 "commits": [
  {
   "sha": "b08c7da4d19cf259f86a7b91a473fb6014f19eb0",
   "date": "2026-10-20T10:02:42Z",
   "message": "test: return typed P2PInterface from add_p2p_connection helpers"
  }
 ],
 "timeline": [
  {
   "t": "2026-10-16T04:33:39Z",
   "kind": "comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "text": "Concept ACK",
   "id": "c:6208147624",
   "url": "https://github.com/bitcoin/bitcoin/pull/36547#issuecomment-6208147624",
   "hash": "e8334cc43879b73c",
   "edited": null
  },
  {
   "t": "2026-10-16T08:04:38Z",
   "kind": "review_comment",
   "who": "maflcko",
   "assoc": "MEMBER",
   "path": "test/functional/test_framework/test_node.py",
   "commit": "e25a0927cdf70a44f81c48bab18536352f7631af",
   "in_reply_to": null,
   "text": "```suggestion\n    def add_p2p_connection(self, p2p_conn: P2PInterfaceT, *, wait_for_verack=True, send_version=True, supports_v2_p2p=None, wait_for_v2_handshake=True, expect_success=True,\n    ...\n    **kwargs,) -> P2PInterfaceT:\n```\n\nnit: at some point the lines are getting long enough to split them. Maybe now? (same below)",
   "id": "rc:4292253804",
   "url": "https://github.com/bitcoin/bitcoin/pull/36547#discussion_r4292253804",
   "hash": "16507b3c28f5ab85",
   "edited": "2026-10-16T08:05:52Z"
  },
  {
   "t": "2026-10-16T08:05:52Z",
   "kind": "review",
   "who": "maflcko",
   "assoc": "MEMBER",
   "state": "APPROVED",
   "commit": "e25a0927cdf70a44f81c48bab18536352f7631af",
   "text": "I don't use type annotations in Python code, but seems fine if others want them",
   "id": "r:5544734409",
   "url": "https://github.com/bitcoin/bitcoin/pull/36547#pullrequestreview-5544734409",
   "hash": "4cc1a6ff002291ab",
   "edited": null
  },
  {
   "t": "2026-10-20T10:03:10Z",
   "kind": "force_push",
   "who": "ViniciusCestarii",
   "commit": "b08c7da4d19cf259f86a7b91a473fb6014f19eb0",
   "id": "push:b08c7da4d19cf259f86a7b91a473fb6014f19eb0"
  },
  {
   "t": "2026-10-20T10:07:41Z",
   "kind": "review_comment",
   "who": "ViniciusCestarii",
   "assoc": "CONTRIBUTOR",
   "path": "test/functional/test_framework/test_node.py",
   "commit": "e25a0927cdf70a44f81c48bab18536352f7631af",
   "in_reply_to": 4292253804,
   "text": "I agree. Done on b08c7da4d19cf259f86a7b91a473fb6014f19eb0",
   "id": "rc:4323801283",
   "url": "https://github.com/bitcoin/bitcoin/pull/36547#discussion_r4323801283",
   "hash": "ac0f4dde911dfe0e",
   "edited": "2026-10-20T10:07:42Z"
  },
  {
   "t": "2026-10-20T10:08:59Z",
   "kind": "comment",
   "who": "ViniciusCestarii",
   "assoc": "CONTRIBUTOR",
   "text": "Thanks for the review. Force-pushed b08c7da4d19cf259f86a7b91a473fb6014f19eb0 addressing https://github.com/bitcoin/bitcoin/pull/36547#discussion_r4292253804",
   "id": "c:6288535542",
   "url": "https://github.com/bitcoin/bitcoin/pull/36547#issuecomment-6288535542",
   "hash": "684028bda0563a32",
   "edited": null
  },
  {
   "t": "2026-10-20T22:06:23Z",
   "kind": "comment",
   "who": "tumutech",
   "assoc": "NONE",
   "text": "ACK b08c7da4d19cf259f86a7b91a473fb6014f19eb0\n\nIn an editor that reads python types, a dot on the value returned by `add_p2p_connection` or `add_outbound_p2p_connection` lists the methods of the class that was passed in, including those methods from P2PInterface.",
   "id": "c:6302833241",
   "url": "https://github.com/bitcoin/bitcoin/pull/36547#issuecomment-6302833241",
   "hash": "fac321aa22764b0e",
   "edited": null
  }
 ],
 "labels_log": [
  {
   "t": "2026-10-15T22:41:53Z",
   "action": "labeled",
   "label": "Tests",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 1187,
 "text_tokens_estimate": 296,
 "changed_paths": [
  "test/functional/test_framework/test_node.py"
 ],
 "files": [
  {
   "path": "test/functional/test_framework/test_node.py",
   "add": 28,
   "del": 3
  }
 ],
 "test_lines": 31,
 "git": {
  "head": "b08c7da4d19cf259f86a7b91a473fb6014f19eb0",
  "head_matches_backup": true,
  "base": "f13ae519de94394314cd63a27924b0998ac65d45",
  "patch_id": "3a4888217c4ea4ee",
  "commits": [
   {
    "sha": "b08c7da4d1",
    "subject": "test: return typed P2PInterface from add_p2p_connection helpers",
    "files": 1,
    "add": 28,
    "del": 3
   }
  ],
  "patch_truncated": false
 },
 "patch_id": "3a4888217c4ea4ee",
 "input_hash": "b7e0d4ccaa9cfabe",
 "extracted_at": "2026-11-02T01:09:49+00:00"
}