{"action":"created","comment":{"url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/comments/215953594","pull_request_review_id":153335214,"id":215953594,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTk1MzU5NA==","diff_hunk":"@@ -428,6 +428,51 @@ bool CUnknownObj::AddSource(CNode *from)\n     return false;\n }\n \n+void CRequestManager::AddRequestedHash(const uint256 blockHash)\n+{\n+    LOCK(cs_requestedHashes);\n+    requestedHashes.insert(blockHash);\n+}\n+\n+bool CRequestManager::CheckRequestedHash(const uint256 blockHash)\n+{\n+    LOCK(cs_requestedHashes);\n+    return requestedHashes.count(blockHash);\n+}\n+\n+void CRequestManager::RemoveRequestedHash(const uint256 blockHash)\n+{\n+    LOCK(cs_requestedHashes);\n+    requestedHashes.erase(blockHash);\n+}\n+\n+bool CRequestManager::RequestBlockByHash(const uint256 &blockHash)\n+{\n+    if (CheckRequestedHash(blockHash))\n+        return true;\n+    // set it to MSG_BLOCK here but it should get overwritten in RequestBlock\n+    CInv obj(2, blockHash);\n+    CNode *pfrom;\n+    {\n+        LOCK(cs_vNodes);\n+        for (CNode *pnode : vNodes)\n+        {\n+            // peer is a fullnode\n+            if (pfrom->nServices & NODE_NETWORK)\n+            {\n+                pfrom = pfrom;\n+                break;","path":"src/requestManager.cpp","position":37,"original_position":37,"commit_id":"0d4ae86f2f2021a4f0bb2a9bf6a573971d67c10a","original_commit_id":"0d4ae86f2f2021a4f0bb2a9bf6a573971d67c10a","user":{"login":"ptschip","id":12862928,"node_id":"MDQ6VXNlcjEyODYyOTI4","avatar_url":"https://avatars0.githubusercontent.com/u/12862928?v=4","gravatar_id":"","url":"https://api.github.com/users/ptschip","html_url":"https://github.com/ptschip","followers_url":"https://api.github.com/users/ptschip/followers","following_url":"https://api.github.com/users/ptschip/following{/other_user}","gists_url":"https://api.github.com/users/ptschip/gists{/gist_id}","starred_url":"https://api.github.com/users/ptschip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptschip/subscriptions","organizations_url":"https://api.github.com/users/ptschip/orgs","repos_url":"https://api.github.com/users/ptschip/repos","events_url":"https://api.github.com/users/ptschip/events{/privacy}","received_events_url":"https://api.github.com/users/ptschip/received_events","type":"User","site_admin":false},"body":"pfrom = pfrom?  probably you meant pfrom = pnode.  , same above with pfrom->nServices.","created_at":"2018-09-07T13:13:44Z","updated_at":"2018-09-07T13:13:44Z","html_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1307#discussion_r215953594","pull_request_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1307","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/comments/215953594"},"html":{"href":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1307#discussion_r215953594"},"pull_request":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1307"}}},"pull_request":{"url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1307","id":213720165,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNzIwMTY1","html_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1307","diff_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1307.diff","patch_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1307.patch","issue_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/1307","number":1307,"state":"open","locked":false,"title":"Add requesting a block by hash to requestmanager","user":{"login":"Greg-Griffith","id":8345264,"node_id":"MDQ6VXNlcjgzNDUyNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8345264?v=4","gravatar_id":"","url":"https://api.github.com/users/Greg-Griffith","html_url":"https://github.com/Greg-Griffith","followers_url":"https://api.github.com/users/Greg-Griffith/followers","following_url":"https://api.github.com/users/Greg-Griffith/following{/other_user}","gists_url":"https://api.github.com/users/Greg-Griffith/gists{/gist_id}","starred_url":"https://api.github.com/users/Greg-Griffith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Greg-Griffith/subscriptions","organizations_url":"https://api.github.com/users/Greg-Griffith/orgs","repos_url":"https://api.github.com/users/Greg-Griffith/repos","events_url":"https://api.github.com/users/Greg-Griffith/events{/privacy}","received_events_url":"https://api.github.com/users/Greg-Griffith/received_events","type":"User","site_admin":false},"body":"This is useful for whenever we want to request a block we want data for \r\nbut are missing. instead of failing we can just redownload it from the \r\nnetwork","created_at":"2018-09-06T19:09:32Z","updated_at":"2018-09-07T13:13:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3bf4936d58ccad34e7f21b5a0684580a0ad8ae42","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1307/commits","review_comments_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1307/comments","review_comment_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/1307/comments","statuses_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/statuses/0d4ae86f2f2021a4f0bb2a9bf6a573971d67c10a","head":{"label":"Greg-Griffith:request-specific-block","ref":"request-specific-block","sha":"0d4ae86f2f2021a4f0bb2a9bf6a573971d67c10a","user":{"login":"Greg-Griffith","id":8345264,"node_id":"MDQ6VXNlcjgzNDUyNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8345264?v=4","gravatar_id":"","url":"https://api.github.com/users/Greg-Griffith","html_url":"https://github.com/Greg-Griffith","followers_url":"https://api.github.com/users/Greg-Griffith/followers","following_url":"https://api.github.com/users/Greg-Griffith/following{/other_user}","gists_url":"https://api.github.com/users/Greg-Griffith/gists{/gist_id}","starred_url":"https://api.github.com/users/Greg-Griffith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Greg-Griffith/subscriptions","organizations_url":"https://api.github.com/users/Greg-Griffith/orgs","repos_url":"https://api.github.com/users/Greg-Griffith/repos","events_url":"https://api.github.com/users/Greg-Griffith/events{/privacy}","received_events_url":"https://api.github.com/users/Greg-Griffith/received_events","type":"User","site_admin":false},"repo":{"id":115289467,"node_id":"MDEwOlJlcG9zaXRvcnkxMTUyODk0Njc=","name":"BitcoinUnlimited","full_name":"Greg-Griffith/BitcoinUnlimited","owner":{"login":"Greg-Griffith","id":8345264,"node_id":"MDQ6VXNlcjgzNDUyNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8345264?v=4","gravatar_id":"","url":"https://api.github.com/users/Greg-Griffith","html_url":"https://github.com/Greg-Griffith","followers_url":"https://api.github.com/users/Greg-Griffith/followers","following_url":"https://api.github.com/users/Greg-Griffith/following{/other_user}","gists_url":"https://api.github.com/users/Greg-Griffith/gists{/gist_id}","starred_url":"https://api.github.com/users/Greg-Griffith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Greg-Griffith/subscriptions","organizations_url":"https://api.github.com/users/Greg-Griffith/orgs","repos_url":"https://api.github.com/users/Greg-Griffith/repos","events_url":"https://api.github.com/users/Greg-Griffith/events{/privacy}","received_events_url":"https://api.github.com/users/Greg-Griffith/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Greg-Griffith/BitcoinUnlimited","description":"Bitcoin Unlimited integration/staging tree","fork":true,"url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited","forks_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/forks","keys_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/teams","hooks_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/hooks","issue_events_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/issues/events{/number}","events_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/events","assignees_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/assignees{/user}","branches_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/branches{/branch}","tags_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/tags","blobs_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/git/refs{/sha}","trees_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/statuses/{sha}","languages_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/languages","stargazers_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/stargazers","contributors_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/contributors","subscribers_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/subscribers","subscription_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/subscription","commits_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/commits{/sha}","git_commits_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/git/commits{/sha}","comments_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/comments{/number}","issue_comment_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/issues/comments{/number}","contents_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/contents/{+path}","compare_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/merges","archive_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/downloads","issues_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/issues{/number}","pulls_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/pulls{/number}","milestones_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/milestones{/number}","notifications_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/labels{/name}","releases_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/releases{/id}","deployments_url":"https://api.github.com/repos/Greg-Griffith/BitcoinUnlimited/deployments","created_at":"2017-12-24T22:07:59Z","updated_at":"2018-05-01T03:35:53Z","pushed_at":"2018-09-06T19:46:08Z","git_url":"git://github.com/Greg-Griffith/BitcoinUnlimited.git","ssh_url":"git@github.com:Greg-Griffith/BitcoinUnlimited.git","clone_url":"https://github.com/Greg-Griffith/BitcoinUnlimited.git","svn_url":"https://github.com/Greg-Griffith/BitcoinUnlimited","homepage":"http://www.bitcoinunlimited.info/download.html","size":95673,"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,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"BitcoinCore"}},"base":{"label":"BitcoinUnlimited:dev","ref":"dev","sha":"af895e920c6200014774273a3ef119cc37c6c808","user":{"login":"BitcoinUnlimited","id":14125627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTI1NjI3","avatar_url":"https://avatars0.githubusercontent.com/u/14125627?v=4","gravatar_id":"","url":"https://api.github.com/users/BitcoinUnlimited","html_url":"https://github.com/BitcoinUnlimited","followers_url":"https://api.github.com/users/BitcoinUnlimited/followers","following_url":"https://api.github.com/users/BitcoinUnlimited/following{/other_user}","gists_url":"https://api.github.com/users/BitcoinUnlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/BitcoinUnlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BitcoinUnlimited/subscriptions","organizations_url":"https://api.github.com/users/BitcoinUnlimited/orgs","repos_url":"https://api.github.com/users/BitcoinUnlimited/repos","events_url":"https://api.github.com/users/BitcoinUnlimited/events{/privacy}","received_events_url":"https://api.github.com/users/BitcoinUnlimited/received_events","type":"Organization","site_admin":false},"repo":{"id":18613259,"node_id":"MDEwOlJlcG9zaXRvcnkxODYxMzI1OQ==","name":"BitcoinUnlimited","full_name":"BitcoinUnlimited/BitcoinUnlimited","owner":{"login":"BitcoinUnlimited","id":14125627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTI1NjI3","avatar_url":"https://avatars0.githubusercontent.com/u/14125627?v=4","gravatar_id":"","url":"https://api.github.com/users/BitcoinUnlimited","html_url":"https://github.com/BitcoinUnlimited","followers_url":"https://api.github.com/users/BitcoinUnlimited/followers","following_url":"https://api.github.com/users/BitcoinUnlimited/following{/other_user}","gists_url":"https://api.github.com/users/BitcoinUnlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/BitcoinUnlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BitcoinUnlimited/subscriptions","organizations_url":"https://api.github.com/users/BitcoinUnlimited/orgs","repos_url":"https://api.github.com/users/BitcoinUnlimited/repos","events_url":"https://api.github.com/users/BitcoinUnlimited/events{/privacy}","received_events_url":"https://api.github.com/users/BitcoinUnlimited/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited","description":"Bitcoin Unlimited integration/staging tree","fork":false,"url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited","forks_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/forks","keys_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/teams","hooks_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/hooks","issue_events_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/events{/number}","events_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/events","assignees_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/assignees{/user}","branches_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/branches{/branch}","tags_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/tags","blobs_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/refs{/sha}","trees_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/statuses/{sha}","languages_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/languages","stargazers_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/stargazers","contributors_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/contributors","subscribers_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/subscribers","subscription_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/subscription","commits_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/commits{/sha}","git_commits_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/commits{/sha}","comments_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/comments{/number}","issue_comment_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/comments{/number}","contents_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/contents/{+path}","compare_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/merges","archive_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/downloads","issues_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues{/number}","pulls_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls{/number}","milestones_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/milestones{/number}","notifications_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/labels{/name}","releases_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/releases{/id}","deployments_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/deployments","created_at":"2014-04-09T21:03:00Z","updated_at":"2018-09-06T16:21:29Z","pushed_at":"2018-09-07T12:41:20Z","git_url":"git://github.com/BitcoinUnlimited/BitcoinUnlimited.git","ssh_url":"git@github.com:BitcoinUnlimited/BitcoinUnlimited.git","clone_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited.git","svn_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited","homepage":"http://www.bitcoinunlimited.info/download.html","size":69232,"stargazers_count":368,"watchers_count":368,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":158,"mirror_url":null,"archived":false,"open_issues_count":75,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":158,"open_issues":75,"watchers":368,"default_branch":"release"}},"_links":{"self":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1307"},"html":{"href":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1307"},"issue":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/1307"},"comments":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/1307/comments"},"review_comments":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1307/comments"},"review_comment":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1307/commits"},"statuses":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/statuses/0d4ae86f2f2021a4f0bb2a9bf6a573971d67c10a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ptschip"}}