{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/58336758","id":58336758,"diff_hunk":"@@ -316,6 +324,7 @@ UniValue getblockheader(const UniValue& params, bool fHelp)\n             \"  \\\"confirmations\\\" : n,   (numeric) The number of confirmations, or -1 if the block is not on the main chain\\n\"\n             \"  \\\"height\\\" : n,          (numeric) The block height or index\\n\"\n             \"  \\\"version\\\" : n,         (numeric) The block version\\n\"\n+            + strprintf(\"  \\\"versionHex\\\" : \\\"00000000\\\", (string) The block version formatted in hexadecimal when version is greater than %d\\n\", VERSIONBITS_LAST_OLD_BLOCK_VERSION) +","path":"src/rpc/blockchain.cpp","position":26,"original_position":26,"commit_id":"2cde916e260df67dd0da61978fc2b2f9871e253b","original_commit_id":"2cde916e260df67dd0da61978fc2b2f9871e253b","user":{"login":"laanwj","id":126646,"avatar_url":"https://avatars.githubusercontent.com/u/126646?v=3","gravatar_id":"","url":"https://api.github.com/users/laanwj","html_url":"https://github.com/laanwj","followers_url":"https://api.github.com/users/laanwj/followers","following_url":"https://api.github.com/users/laanwj/following{/other_user}","gists_url":"https://api.github.com/users/laanwj/gists{/gist_id}","starred_url":"https://api.github.com/users/laanwj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laanwj/subscriptions","organizations_url":"https://api.github.com/users/laanwj/orgs","repos_url":"https://api.github.com/users/laanwj/repos","events_url":"https://api.github.com/users/laanwj/events{/privacy}","received_events_url":"https://api.github.com/users/laanwj/received_events","type":"User","site_admin":false},"body":"\"when version is greater than %d\" looks kind of arbitrary, out of context.\r\nMaybe we should mention BIP9 explicitly in the help.\r\nThe reason for this threshold is that BIP9 version bits start to be relevant, right?\r\n","created_at":"2016-04-04T07:24:33Z","updated_at":"2016-04-04T07:24:33Z","html_url":"https://github.com/bitcoin/bitcoin/pull/7774#discussion_r58336758","pull_request_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/7774","_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/58336758"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/7774#discussion_r58336758"},"pull_request":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/7774"}}},"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/7774","id":64711693,"html_url":"https://github.com/bitcoin/bitcoin/pull/7774","diff_url":"https://github.com/bitcoin/bitcoin/pull/7774.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/7774.patch","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7774","number":7774,"state":"open","locked":false,"title":"RPC: add versionHex in getblock and getblockheader JSON results","user":{"login":"mruddy","id":6440430,"avatar_url":"https://avatars.githubusercontent.com/u/6440430?v=3","gravatar_id":"","url":"https://api.github.com/users/mruddy","html_url":"https://github.com/mruddy","followers_url":"https://api.github.com/users/mruddy/followers","following_url":"https://api.github.com/users/mruddy/following{/other_user}","gists_url":"https://api.github.com/users/mruddy/gists{/gist_id}","starred_url":"https://api.github.com/users/mruddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruddy/subscriptions","organizations_url":"https://api.github.com/users/mruddy/orgs","repos_url":"https://api.github.com/users/mruddy/repos","events_url":"https://api.github.com/users/mruddy/events{/privacy}","received_events_url":"https://api.github.com/users/mruddy/received_events","type":"User","site_admin":false},"body":"Update `getblock` and `getblockheader` RPCs and rest to return hex encoded block versions, e.g.:\r\n\r\n`\"version\": \"0x01\"`\r\n\r\n`\"version\": \"0x20000000\"`\r\n\r\nReason is similar to https://github.com/bitcoin/bitcoin/pull/7763: \"The decimal printing of block nVersion is not very readable in a versionbits world.\"\r\n\r\nMy only apprehension is that this could be disruptive to people that have script relying on this output. But, I'm not aware of any guarantee that this will not change.\r\n\r\nI purposefully chose 02 instead of 08 in order to get a smaller encoding when possible.","created_at":"2016-03-30T23:06:02Z","updated_at":"2016-04-04T07:24:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c446e4cf96f1a8a24ea5fd1108086c7f4568fd8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/7774/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/7774/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7774/comments","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/2cde916e260df67dd0da61978fc2b2f9871e253b","head":{"label":"mruddy:hexver","ref":"hexver","sha":"2cde916e260df67dd0da61978fc2b2f9871e253b","user":{"login":"mruddy","id":6440430,"avatar_url":"https://avatars.githubusercontent.com/u/6440430?v=3","gravatar_id":"","url":"https://api.github.com/users/mruddy","html_url":"https://github.com/mruddy","followers_url":"https://api.github.com/users/mruddy/followers","following_url":"https://api.github.com/users/mruddy/following{/other_user}","gists_url":"https://api.github.com/users/mruddy/gists{/gist_id}","starred_url":"https://api.github.com/users/mruddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruddy/subscriptions","organizations_url":"https://api.github.com/users/mruddy/orgs","repos_url":"https://api.github.com/users/mruddy/repos","events_url":"https://api.github.com/users/mruddy/events{/privacy}","received_events_url":"https://api.github.com/users/mruddy/received_events","type":"User","site_admin":false},"repo":{"id":26165777,"name":"bitcoin","full_name":"mruddy/bitcoin","owner":{"login":"mruddy","id":6440430,"avatar_url":"https://avatars.githubusercontent.com/u/6440430?v=3","gravatar_id":"","url":"https://api.github.com/users/mruddy","html_url":"https://github.com/mruddy","followers_url":"https://api.github.com/users/mruddy/followers","following_url":"https://api.github.com/users/mruddy/following{/other_user}","gists_url":"https://api.github.com/users/mruddy/gists{/gist_id}","starred_url":"https://api.github.com/users/mruddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruddy/subscriptions","organizations_url":"https://api.github.com/users/mruddy/orgs","repos_url":"https://api.github.com/users/mruddy/repos","events_url":"https://api.github.com/users/mruddy/events{/privacy}","received_events_url":"https://api.github.com/users/mruddy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mruddy/bitcoin","description":"Bitcoin Core integration/staging tree","fork":true,"url":"https://api.github.com/repos/mruddy/bitcoin","forks_url":"https://api.github.com/repos/mruddy/bitcoin/forks","keys_url":"https://api.github.com/repos/mruddy/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mruddy/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mruddy/bitcoin/teams","hooks_url":"https://api.github.com/repos/mruddy/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/mruddy/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/mruddy/bitcoin/events","assignees_url":"https://api.github.com/repos/mruddy/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/mruddy/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/mruddy/bitcoin/tags","blobs_url":"https://api.github.com/repos/mruddy/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mruddy/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mruddy/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/mruddy/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mruddy/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/mruddy/bitcoin/languages","stargazers_url":"https://api.github.com/repos/mruddy/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/mruddy/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/mruddy/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/mruddy/bitcoin/subscription","commits_url":"https://api.github.com/repos/mruddy/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/mruddy/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/mruddy/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/mruddy/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/mruddy/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/mruddy/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mruddy/bitcoin/merges","archive_url":"https://api.github.com/repos/mruddy/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mruddy/bitcoin/downloads","issues_url":"https://api.github.com/repos/mruddy/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/mruddy/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/mruddy/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/mruddy/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mruddy/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/mruddy/bitcoin/releases{/id}","deployments_url":"https://api.github.com/repos/mruddy/bitcoin/deployments","created_at":"2014-11-04T11:20:28Z","updated_at":"2016-01-12T20:53:04Z","pushed_at":"2016-04-03T16:26:13Z","git_url":"git://github.com/mruddy/bitcoin.git","ssh_url":"git@github.com:mruddy/bitcoin.git","clone_url":"https://github.com/mruddy/bitcoin.git","svn_url":"https://github.com/mruddy/bitcoin","homepage":"https://bitcoin.org/en/download","size":58733,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"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":"30c2dd8d0598afac9319d3a813a89a682b9c0d34","user":{"login":"bitcoin","id":528860,"avatar_url":"https://avatars.githubusercontent.com/u/528860?v=3","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://avatars.githubusercontent.com/u/528860?v=3","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":"2016-04-04T05:34:59Z","pushed_at":"2016-04-03T20:23:59Z","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":128505,"stargazers_count":8792,"watchers_count":8792,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":5964,"mirror_url":null,"open_issues_count":444,"forks":5964,"open_issues":444,"watchers":8792,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/7774"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/7774"},"issue":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/7774"},"comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/7774/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/7774/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/7774/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bitcoin/statuses/2cde916e260df67dd0da61978fc2b2f9871e253b"}}}}