{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/139763178","pull_request_review_id":63741641,"id":139763178,"diff_hunk":"@@ -1310,8 +1310,8 @@ def __repr__(self):\n class msg_headers(object):\n     command = b\"headers\"\n \n-    def __init__(self):\n-        self.headers = []\n+    def __init__(self, headers=None):\n+        self.headers = headers if headers is not None else []","path":"test/functional/test_framework/mininode.py","position":7,"original_position":7,"commit_id":"d07a788f256427f861b2bac5cf2784a5ed26e654","original_commit_id":"d07a788f256427f861b2bac5cf2784a5ed26e654","user":{"login":"jimpo","id":881253,"avatar_url":"https://avatars3.githubusercontent.com/u/881253?v=4","gravatar_id":"","url":"https://api.github.com/users/jimpo","html_url":"https://github.com/jimpo","followers_url":"https://api.github.com/users/jimpo/followers","following_url":"https://api.github.com/users/jimpo/following{/other_user}","gists_url":"https://api.github.com/users/jimpo/gists{/gist_id}","starred_url":"https://api.github.com/users/jimpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimpo/subscriptions","organizations_url":"https://api.github.com/users/jimpo/orgs","repos_url":"https://api.github.com/users/jimpo/repos","events_url":"https://api.github.com/users/jimpo/events{/privacy}","received_events_url":"https://api.github.com/users/jimpo/received_events","type":"User","site_admin":false},"body":"That is not safe in Python: http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments.","created_at":"2017-09-19T17:34:35Z","updated_at":"2017-09-19T17:34:36Z","html_url":"https://github.com/bitcoin/bitcoin/pull/11113#discussion_r139763178","pull_request_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11113","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/139763178"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/11113#discussion_r139763178"},"pull_request":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11113"}},"in_reply_to_id":139557154},"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11113","id":137081423,"html_url":"https://github.com/bitcoin/bitcoin/pull/11113","diff_url":"https://github.com/bitcoin/bitcoin/pull/11113.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/11113.patch","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/11113","number":11113,"state":"open","locked":false,"title":"[net] Ignore getheaders requests for very old side blocks.","user":{"login":"jimpo","id":881253,"avatar_url":"https://avatars3.githubusercontent.com/u/881253?v=4","gravatar_id":"","url":"https://api.github.com/users/jimpo","html_url":"https://github.com/jimpo","followers_url":"https://api.github.com/users/jimpo/followers","following_url":"https://api.github.com/users/jimpo/following{/other_user}","gists_url":"https://api.github.com/users/jimpo/gists{/gist_id}","starred_url":"https://api.github.com/users/jimpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimpo/subscriptions","organizations_url":"https://api.github.com/users/jimpo/orgs","repos_url":"https://api.github.com/users/jimpo/repos","events_url":"https://api.github.com/users/jimpo/events{/privacy}","received_events_url":"https://api.github.com/users/jimpo/received_events","type":"User","site_admin":false},"body":"Sending a getheaders message with an empty locator and a stop hash is a request for a single header by hash. The node will respond with headers for blocks not in the main chain as well as those in the main chain. To avoid fingerprinting, the node should, however, ignore requests for headers on side branches that are too old. This replicates the logic that currently exists for `getdata` requests for blocks.","created_at":"2017-08-22T21:15:04Z","updated_at":"2017-09-19T17:34:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7b7a110523c9f07350785cc5fc02cf36fd5bb69","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11113/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11113/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/11113/comments","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/d07a788f256427f861b2bac5cf2784a5ed26e654","head":{"label":"jimpo:net-getheaders-fingerprint","ref":"net-getheaders-fingerprint","sha":"d07a788f256427f861b2bac5cf2784a5ed26e654","user":{"login":"jimpo","id":881253,"avatar_url":"https://avatars3.githubusercontent.com/u/881253?v=4","gravatar_id":"","url":"https://api.github.com/users/jimpo","html_url":"https://github.com/jimpo","followers_url":"https://api.github.com/users/jimpo/followers","following_url":"https://api.github.com/users/jimpo/following{/other_user}","gists_url":"https://api.github.com/users/jimpo/gists{/gist_id}","starred_url":"https://api.github.com/users/jimpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimpo/subscriptions","organizations_url":"https://api.github.com/users/jimpo/orgs","repos_url":"https://api.github.com/users/jimpo/repos","events_url":"https://api.github.com/users/jimpo/events{/privacy}","received_events_url":"https://api.github.com/users/jimpo/received_events","type":"User","site_admin":false},"repo":{"id":18502174,"name":"bitcoin","full_name":"jimpo/bitcoin","owner":{"login":"jimpo","id":881253,"avatar_url":"https://avatars3.githubusercontent.com/u/881253?v=4","gravatar_id":"","url":"https://api.github.com/users/jimpo","html_url":"https://github.com/jimpo","followers_url":"https://api.github.com/users/jimpo/followers","following_url":"https://api.github.com/users/jimpo/following{/other_user}","gists_url":"https://api.github.com/users/jimpo/gists{/gist_id}","starred_url":"https://api.github.com/users/jimpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimpo/subscriptions","organizations_url":"https://api.github.com/users/jimpo/orgs","repos_url":"https://api.github.com/users/jimpo/repos","events_url":"https://api.github.com/users/jimpo/events{/privacy}","received_events_url":"https://api.github.com/users/jimpo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jimpo/bitcoin","description":"Bitcoin Core integration/staging tree","fork":true,"url":"https://api.github.com/repos/jimpo/bitcoin","forks_url":"https://api.github.com/repos/jimpo/bitcoin/forks","keys_url":"https://api.github.com/repos/jimpo/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jimpo/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jimpo/bitcoin/teams","hooks_url":"https://api.github.com/repos/jimpo/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/jimpo/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/jimpo/bitcoin/events","assignees_url":"https://api.github.com/repos/jimpo/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/jimpo/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/jimpo/bitcoin/tags","blobs_url":"https://api.github.com/repos/jimpo/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jimpo/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jimpo/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jimpo/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jimpo/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/jimpo/bitcoin/languages","stargazers_url":"https://api.github.com/repos/jimpo/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/jimpo/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/jimpo/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/jimpo/bitcoin/subscription","commits_url":"https://api.github.com/repos/jimpo/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jimpo/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jimpo/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jimpo/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jimpo/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/jimpo/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jimpo/bitcoin/merges","archive_url":"https://api.github.com/repos/jimpo/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jimpo/bitcoin/downloads","issues_url":"https://api.github.com/repos/jimpo/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/jimpo/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/jimpo/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/jimpo/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jimpo/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/jimpo/bitcoin/releases{/id}","deployments_url":"https://api.github.com/repos/jimpo/bitcoin/deployments","created_at":"2014-04-06T23:53:29Z","updated_at":"2017-08-16T01:18:11Z","pushed_at":"2017-09-08T20:35:25Z","git_url":"git://github.com/jimpo/bitcoin.git","ssh_url":"git@github.com:jimpo/bitcoin.git","clone_url":"https://github.com/jimpo/bitcoin.git","svn_url":"https://github.com/jimpo/bitcoin","homepage":"https://bitcoin.org/en/download","size":75917,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bitcoin:master","ref":"master","sha":"3255d6347b1f9eccbec3d6d93d4a424087a3b35b","user":{"login":"bitcoin","id":528860,"avatar_url":"https://avatars2.githubusercontent.com/u/528860?v=4","gravatar_id":"","url":"https://api.github.com/users/bitcoin","html_url":"https://github.com/bitcoin","followers_url":"https://api.github.com/users/bitcoin/followers","following_url":"https://api.github.com/users/bitcoin/following{/other_user}","gists_url":"https://api.github.com/users/bitcoin/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoin/subscriptions","organizations_url":"https://api.github.com/users/bitcoin/orgs","repos_url":"https://api.github.com/users/bitcoin/repos","events_url":"https://api.github.com/users/bitcoin/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoin/received_events","type":"Organization","site_admin":false},"repo":{"id":1181927,"name":"bitcoin","full_name":"bitcoin/bitcoin","owner":{"login":"bitcoin","id":528860,"avatar_url":"https://avatars2.githubusercontent.com/u/528860?v=4","gravatar_id":"","url":"https://api.github.com/users/bitcoin","html_url":"https://github.com/bitcoin","followers_url":"https://api.github.com/users/bitcoin/followers","following_url":"https://api.github.com/users/bitcoin/following{/other_user}","gists_url":"https://api.github.com/users/bitcoin/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoin/subscriptions","organizations_url":"https://api.github.com/users/bitcoin/orgs","repos_url":"https://api.github.com/users/bitcoin/repos","events_url":"https://api.github.com/users/bitcoin/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitcoin/bitcoin","description":"Bitcoin Core integration/staging tree","fork":false,"url":"https://api.github.com/repos/bitcoin/bitcoin","forks_url":"https://api.github.com/repos/bitcoin/bitcoin/forks","keys_url":"https://api.github.com/repos/bitcoin/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitcoin/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitcoin/bitcoin/teams","hooks_url":"https://api.github.com/repos/bitcoin/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/bitcoin/bitcoin/events","assignees_url":"https://api.github.com/repos/bitcoin/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/bitcoin/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/bitcoin/bitcoin/tags","blobs_url":"https://api.github.com/repos/bitcoin/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitcoin/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitcoin/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitcoin/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/bitcoin/bitcoin/languages","stargazers_url":"https://api.github.com/repos/bitcoin/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/bitcoin/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/bitcoin/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/bitcoin/bitcoin/subscription","commits_url":"https://api.github.com/repos/bitcoin/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitcoin/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitcoin/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/bitcoin/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitcoin/bitcoin/merges","archive_url":"https://api.github.com/repos/bitcoin/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitcoin/bitcoin/downloads","issues_url":"https://api.github.com/repos/bitcoin/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/bitcoin/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/bitcoin/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/bitcoin/bitcoin/releases{/id}","deployments_url":"https://api.github.com/repos/bitcoin/bitcoin/deployments","created_at":"2010-12-19T15:16:43Z","updated_at":"2017-09-19T17:32:20Z","pushed_at":"2017-09-19T15:46:16Z","git_url":"git://github.com/bitcoin/bitcoin.git","ssh_url":"git@github.com:bitcoin/bitcoin.git","clone_url":"https://github.com/bitcoin/bitcoin.git","svn_url":"https://github.com/bitcoin/bitcoin","homepage":"https://bitcoin.org/en/download","size":87350,"stargazers_count":16813,"watchers_count":16813,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":10271,"mirror_url":null,"open_issues_count":802,"forks":10271,"open_issues":802,"watchers":16813,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11113"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/11113"},"issue":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/11113"},"comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/11113/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11113/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11113/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bitcoin/statuses/d07a788f256427f861b2bac5cf2784a5ed26e654"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jimpo"}}