{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/174286202","pull_request_review_id":103615024,"id":174286202,"diff_hunk":"@@ -215,14 +214,19 @@ UniValue addnode(const JSONRPCRequest& request)\n         throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, \"Error: Peer-to-peer functionality missing or disabled\");\n \n     std::string strNode = request.params[0].get_str();\n+    const bool privileged = request.params[2].isNull() ? true : request.params[2].get_bool();\n \n     if (strCommand == \"onetry\")\n     {\n         CAddress addr;\n-        g_connman->OpenNetworkConnection(addr, false, nullptr, strNode.c_str(), false, false, true);\n+        g_connman->OpenNetworkConnection(addr, false, nullptr, strNode.c_str(), false, false, privileged);\n         return NullUniValue;\n     }\n \n+    if (privileged) {\n+        throw JSONRPCError(RPC_INVALID_PARAMETER, \"Unprivileged connections are only supported for the \\\"onetry\\\" command for now\");","path":"src/rpc/net.cpp","position":null,"original_position":36,"commit_id":"0670e4fffcc1cdb431fd43a61d630fe425d200c7","original_commit_id":"c21d55ac910278e3dd926c0064d4a1e9360f9a33","user":{"login":"luke-jr","id":1095675,"avatar_url":"https://avatars2.githubusercontent.com/u/1095675?v=4","gravatar_id":"","url":"https://api.github.com/users/luke-jr","html_url":"https://github.com/luke-jr","followers_url":"https://api.github.com/users/luke-jr/followers","following_url":"https://api.github.com/users/luke-jr/following{/other_user}","gists_url":"https://api.github.com/users/luke-jr/gists{/gist_id}","starred_url":"https://api.github.com/users/luke-jr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luke-jr/subscriptions","organizations_url":"https://api.github.com/users/luke-jr/orgs","repos_url":"https://api.github.com/users/luke-jr/repos","events_url":"https://api.github.com/users/luke-jr/events{/privacy}","received_events_url":"https://api.github.com/users/luke-jr/received_events","type":"User","site_admin":false},"body":"I don't see how it could mean the former in standard English.","created_at":"2018-03-13T21:13:02Z","updated_at":"2018-03-13T21:13:03Z","html_url":"https://github.com/bitcoin/bitcoin/pull/12674#discussion_r174286202","pull_request_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/12674","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/174286202"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/12674#discussion_r174286202"},"pull_request":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/12674"}},"in_reply_to_id":174284898},"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/12674","id":174279198,"html_url":"https://github.com/bitcoin/bitcoin/pull/12674","diff_url":"https://github.com/bitcoin/bitcoin/pull/12674.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/12674.patch","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/12674","number":12674,"state":"open","locked":false,"title":"RPC: Support addnode onetry without making the connection priviliged","user":{"login":"luke-jr","id":1095675,"avatar_url":"https://avatars2.githubusercontent.com/u/1095675?v=4","gravatar_id":"","url":"https://api.github.com/users/luke-jr","html_url":"https://github.com/luke-jr","followers_url":"https://api.github.com/users/luke-jr/followers","following_url":"https://api.github.com/users/luke-jr/following{/other_user}","gists_url":"https://api.github.com/users/luke-jr/gists{/gist_id}","starred_url":"https://api.github.com/users/luke-jr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luke-jr/subscriptions","organizations_url":"https://api.github.com/users/luke-jr/orgs","repos_url":"https://api.github.com/users/luke-jr/repos","events_url":"https://api.github.com/users/luke-jr/events{/privacy}","received_events_url":"https://api.github.com/users/luke-jr/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-12T06:03:31Z","updated_at":"2018-03-13T21:13:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b51537d6b7b6835cab241fbbb419388e73a9d04c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":98279177,"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/RPC/REST/ZMQ","name":"RPC/REST/ZMQ","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/12674/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/12674/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/12674/comments","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/0670e4fffcc1cdb431fd43a61d630fe425d200c7","head":{"label":"luke-jr:rpc_onetry_nonpriv","ref":"rpc_onetry_nonpriv","sha":"0670e4fffcc1cdb431fd43a61d630fe425d200c7","user":{"login":"luke-jr","id":1095675,"avatar_url":"https://avatars2.githubusercontent.com/u/1095675?v=4","gravatar_id":"","url":"https://api.github.com/users/luke-jr","html_url":"https://github.com/luke-jr","followers_url":"https://api.github.com/users/luke-jr/followers","following_url":"https://api.github.com/users/luke-jr/following{/other_user}","gists_url":"https://api.github.com/users/luke-jr/gists{/gist_id}","starred_url":"https://api.github.com/users/luke-jr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luke-jr/subscriptions","organizations_url":"https://api.github.com/users/luke-jr/orgs","repos_url":"https://api.github.com/users/luke-jr/repos","events_url":"https://api.github.com/users/luke-jr/events{/privacy}","received_events_url":"https://api.github.com/users/luke-jr/received_events","type":"User","site_admin":false},"repo":{"id":2514537,"name":"bitcoin","full_name":"luke-jr/bitcoin","owner":{"login":"luke-jr","id":1095675,"avatar_url":"https://avatars2.githubusercontent.com/u/1095675?v=4","gravatar_id":"","url":"https://api.github.com/users/luke-jr","html_url":"https://github.com/luke-jr","followers_url":"https://api.github.com/users/luke-jr/followers","following_url":"https://api.github.com/users/luke-jr/following{/other_user}","gists_url":"https://api.github.com/users/luke-jr/gists{/gist_id}","starred_url":"https://api.github.com/users/luke-jr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luke-jr/subscriptions","organizations_url":"https://api.github.com/users/luke-jr/orgs","repos_url":"https://api.github.com/users/luke-jr/repos","events_url":"https://api.github.com/users/luke-jr/events{/privacy}","received_events_url":"https://api.github.com/users/luke-jr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/luke-jr/bitcoin","description":"Bitcoin integration/staging tree","fork":true,"url":"https://api.github.com/repos/luke-jr/bitcoin","forks_url":"https://api.github.com/repos/luke-jr/bitcoin/forks","keys_url":"https://api.github.com/repos/luke-jr/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/luke-jr/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/luke-jr/bitcoin/teams","hooks_url":"https://api.github.com/repos/luke-jr/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/luke-jr/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/luke-jr/bitcoin/events","assignees_url":"https://api.github.com/repos/luke-jr/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/luke-jr/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/luke-jr/bitcoin/tags","blobs_url":"https://api.github.com/repos/luke-jr/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/luke-jr/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/luke-jr/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/luke-jr/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/luke-jr/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/luke-jr/bitcoin/languages","stargazers_url":"https://api.github.com/repos/luke-jr/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/luke-jr/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/luke-jr/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/luke-jr/bitcoin/subscription","commits_url":"https://api.github.com/repos/luke-jr/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/luke-jr/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/luke-jr/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/luke-jr/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/luke-jr/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/luke-jr/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/luke-jr/bitcoin/merges","archive_url":"https://api.github.com/repos/luke-jr/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/luke-jr/bitcoin/downloads","issues_url":"https://api.github.com/repos/luke-jr/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/luke-jr/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/luke-jr/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/luke-jr/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/luke-jr/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/luke-jr/bitcoin/releases{/id}","deployments_url":"https://api.github.com/repos/luke-jr/bitcoin/deployments","created_at":"2011-10-04T20:22:23Z","updated_at":"2017-12-20T13:30:50Z","pushed_at":"2018-03-13T21:11:57Z","git_url":"git://github.com/luke-jr/bitcoin.git","ssh_url":"git@github.com:luke-jr/bitcoin.git","clone_url":"https://github.com/luke-jr/bitcoin.git","svn_url":"https://github.com/luke-jr/bitcoin","homepage":"","size":114928,"stargazers_count":15,"watchers_count":15,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":6,"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"},"forks":6,"open_issues":0,"watchers":15,"default_branch":"0.11.x-ljrP"}},"base":{"label":"bitcoin:master","ref":"master","sha":"d42a4fe5aaae60f33a89bde78f21820abefce922","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":"2018-03-13T20:04:30Z","pushed_at":"2018-03-13T21:13:02Z","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":98423,"stargazers_count":29242,"watchers_count":29242,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":17413,"mirror_url":null,"archived":false,"open_issues_count":817,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":17413,"open_issues":817,"watchers":29242,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/12674"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/12674"},"issue":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/12674"},"comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/12674/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/12674/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/12674/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bitcoin/statuses/0670e4fffcc1cdb431fd43a61d630fe425d200c7"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"luke-jr"}}