{"action":"closed","number":8838,"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/8838","id":87325322,"html_url":"https://github.com/bitcoin/bitcoin/pull/8838","diff_url":"https://github.com/bitcoin/bitcoin/pull/8838.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/8838.patch","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/8838","number":8838,"state":"closed","locked":false,"title":"Calculate size and weight of block correctly in CreateNewBlock()","user":{"login":"jnewbery","id":1063656,"avatar_url":"https://avatars.githubusercontent.com/u/1063656?v=3","gravatar_id":"","url":"https://api.github.com/users/jnewbery","html_url":"https://github.com/jnewbery","followers_url":"https://api.github.com/users/jnewbery/followers","following_url":"https://api.github.com/users/jnewbery/following{/other_user}","gists_url":"https://api.github.com/users/jnewbery/gists{/gist_id}","starred_url":"https://api.github.com/users/jnewbery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnewbery/subscriptions","organizations_url":"https://api.github.com/users/jnewbery/orgs","repos_url":"https://api.github.com/users/jnewbery/repos","events_url":"https://api.github.com/users/jnewbery/events{/privacy}","received_events_url":"https://api.github.com/users/jnewbery/received_events","type":"User","site_admin":false},"body":"bitcoind writes the following log when it's created a new block:\n\n`CreateNewBlock(): total size _ txs: _ fees: _ sigops _`\n\nIf this is post-segwit and the miner is counting weight and not block size, then the size field will be incorrect (it will always be set to 1000).\n\nThis PR fixes the log in the following way:\n- if the miner is not accounting for size, then only log the weight of the block.\n- if the miner _is_ accounting for size, then log the size _and_ weight of the block.\n\nI've run all tests and manually verified that the log output is correct when using the `blockmaxsize` and `blockmaxweight` command line parameters.\n","created_at":"2016-09-29T14:34:09Z","updated_at":"2016-11-17T13:15:24Z","closed_at":"2016-11-17T13:15:24Z","merged_at":"2016-11-17T13:15:24Z","merge_commit_sha":"5f274a1749acfdf331bc2931e25ac80c346e5faa","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/8838/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/8838/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/8838/comments","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/5f274a1749acfdf331bc2931e25ac80c346e5faa","head":{"label":"jnewbery:dont_log_size","ref":"dont_log_size","sha":"5f274a1749acfdf331bc2931e25ac80c346e5faa","user":{"login":"jnewbery","id":1063656,"avatar_url":"https://avatars.githubusercontent.com/u/1063656?v=3","gravatar_id":"","url":"https://api.github.com/users/jnewbery","html_url":"https://github.com/jnewbery","followers_url":"https://api.github.com/users/jnewbery/followers","following_url":"https://api.github.com/users/jnewbery/following{/other_user}","gists_url":"https://api.github.com/users/jnewbery/gists{/gist_id}","starred_url":"https://api.github.com/users/jnewbery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnewbery/subscriptions","organizations_url":"https://api.github.com/users/jnewbery/orgs","repos_url":"https://api.github.com/users/jnewbery/repos","events_url":"https://api.github.com/users/jnewbery/events{/privacy}","received_events_url":"https://api.github.com/users/jnewbery/received_events","type":"User","site_admin":false},"repo":{"id":68248485,"name":"bitcoin","full_name":"jnewbery/bitcoin","owner":{"login":"jnewbery","id":1063656,"avatar_url":"https://avatars.githubusercontent.com/u/1063656?v=3","gravatar_id":"","url":"https://api.github.com/users/jnewbery","html_url":"https://github.com/jnewbery","followers_url":"https://api.github.com/users/jnewbery/followers","following_url":"https://api.github.com/users/jnewbery/following{/other_user}","gists_url":"https://api.github.com/users/jnewbery/gists{/gist_id}","starred_url":"https://api.github.com/users/jnewbery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnewbery/subscriptions","organizations_url":"https://api.github.com/users/jnewbery/orgs","repos_url":"https://api.github.com/users/jnewbery/repos","events_url":"https://api.github.com/users/jnewbery/events{/privacy}","received_events_url":"https://api.github.com/users/jnewbery/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jnewbery/bitcoin","description":"Bitcoin Core integration/staging tree","fork":true,"url":"https://api.github.com/repos/jnewbery/bitcoin","forks_url":"https://api.github.com/repos/jnewbery/bitcoin/forks","keys_url":"https://api.github.com/repos/jnewbery/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jnewbery/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jnewbery/bitcoin/teams","hooks_url":"https://api.github.com/repos/jnewbery/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/jnewbery/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/jnewbery/bitcoin/events","assignees_url":"https://api.github.com/repos/jnewbery/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/jnewbery/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/jnewbery/bitcoin/tags","blobs_url":"https://api.github.com/repos/jnewbery/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jnewbery/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jnewbery/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jnewbery/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jnewbery/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/jnewbery/bitcoin/languages","stargazers_url":"https://api.github.com/repos/jnewbery/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/jnewbery/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/jnewbery/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/jnewbery/bitcoin/subscription","commits_url":"https://api.github.com/repos/jnewbery/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jnewbery/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jnewbery/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jnewbery/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jnewbery/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/jnewbery/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jnewbery/bitcoin/merges","archive_url":"https://api.github.com/repos/jnewbery/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jnewbery/bitcoin/downloads","issues_url":"https://api.github.com/repos/jnewbery/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/jnewbery/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/jnewbery/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/jnewbery/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jnewbery/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/jnewbery/bitcoin/releases{/id}","deployments_url":"https://api.github.com/repos/jnewbery/bitcoin/deployments","created_at":"2016-09-14T22:29:05Z","updated_at":"2016-09-14T22:29:18Z","pushed_at":"2016-11-16T17:18:35Z","git_url":"git://github.com/jnewbery/bitcoin.git","ssh_url":"git@github.com:jnewbery/bitcoin.git","clone_url":"https://github.com/jnewbery/bitcoin.git","svn_url":"https://github.com/jnewbery/bitcoin","homepage":"https://bitcoin.org/en/download","size":74379,"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":"d7615af34e8e19920ed12bfdafb09e0e4b57c7c5","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-11-17T12:24:27Z","pushed_at":"2016-11-17T13:15:13Z","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":160249,"stargazers_count":10444,"watchers_count":10444,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":6877,"mirror_url":null,"open_issues_count":519,"forks":6877,"open_issues":519,"watchers":10444,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/8838"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/8838"},"issue":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/8838"},"comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/8838/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/8838/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/8838/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bitcoin/statuses/5f274a1749acfdf331bc2931e25ac80c346e5faa"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"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},"comments":7,"review_comments":0,"commits":1,"additions":3,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"laanwj"}}