{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/212850530","pull_request_review_id":149563528,"id":212850530,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjg1MDUzMA==","diff_hunk":"@@ -89,6 +90,23 @@ class CBlock : public CBlockHeader\n         *(static_cast<CBlockHeader*>(this)) = header;\n     }\n \n+    CBlock(const CBlock &block)\n+        :CBlock(static_cast<CBlockHeader>(block))\n+    {\n+        vtx = block.vtx;\n+        fChecked = false;","path":"src/primitives/block.h","position":25,"original_position":25,"commit_id":"ffb0adde09b17a19388bb2a906424a32ae5e1433","original_commit_id":"ffb0adde09b17a19388bb2a906424a32ae5e1433","user":{"login":"MarcoFalke","id":6399679,"node_id":"MDQ6VXNlcjYzOTk2Nzk=","avatar_url":"https://avatars0.githubusercontent.com/u/6399679?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcoFalke","html_url":"https://github.com/MarcoFalke","followers_url":"https://api.github.com/users/MarcoFalke/followers","following_url":"https://api.github.com/users/MarcoFalke/following{/other_user}","gists_url":"https://api.github.com/users/MarcoFalke/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoFalke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoFalke/subscriptions","organizations_url":"https://api.github.com/users/MarcoFalke/orgs","repos_url":"https://api.github.com/users/MarcoFalke/repos","events_url":"https://api.github.com/users/MarcoFalke/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoFalke/received_events","type":"User","site_admin":false},"body":"Any reason to set this to false when copying?\r\n\r\nnit: Also, could rename the member to `m_checked`, since it is only used in one function on master.","created_at":"2018-08-27T01:53:26Z","updated_at":"2018-08-27T01:53:26Z","html_url":"https://github.com/bitcoin/bitcoin/pull/14072#discussion_r212850530","pull_request_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/14072","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/212850530"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/14072#discussion_r212850530"},"pull_request":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/14072"}}},"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/14072","id":210964018,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwOTY0MDE4","html_url":"https://github.com/bitcoin/bitcoin/pull/14072","diff_url":"https://github.com/bitcoin/bitcoin/pull/14072.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/14072.patch","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/14072","number":14072,"state":"open","locked":false,"title":"[primitives, consensus] Make fChecked an atomic<bool>","user":{"login":"skeees","id":195769,"node_id":"MDQ6VXNlcjE5NTc2OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/195769?v=4","gravatar_id":"","url":"https://api.github.com/users/skeees","html_url":"https://github.com/skeees","followers_url":"https://api.github.com/users/skeees/followers","following_url":"https://api.github.com/users/skeees/following{/other_user}","gists_url":"https://api.github.com/users/skeees/gists{/gist_id}","starred_url":"https://api.github.com/users/skeees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeees/subscriptions","organizations_url":"https://api.github.com/users/skeees/orgs","repos_url":"https://api.github.com/users/skeees/repos","events_url":"https://api.github.com/users/skeees/events{/privacy}","received_events_url":"https://api.github.com/users/skeees/received_events","type":"User","site_admin":false},"body":"This addresses a data race / thread sanitizer issue uncovered in #14058 \r\n\r\nIf there are alternate suggestions about how to effectuate this change in a more compact way without having to manually declare the copy constructor and copy assignment operator (because it is deleted for `std::atomic<bool>` that feedback would be welcome). \r\n\r\nCheckBlock can be invoked from multiple threads in parallel. To avoid\r\na data race, fChecked should be atomic. In practice, this would have\r\nhad limited effect currently since these paths are effectively\r\nsingle-threaded in practice, except to maybe occasionally cause a\r\nslight bit of redundant work to be performed in CheckBlock.","created_at":"2018-08-26T18:22:04Z","updated_at":"2018-08-27T01:53:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"585f064e9ae4e07c6ab71a9732146d39c80ec3f3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/14072/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/14072/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/14072/comments","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/ffb0adde09b17a19388bb2a906424a32ae5e1433","head":{"label":"skeees:fchecked-atomic","ref":"fchecked-atomic","sha":"ffb0adde09b17a19388bb2a906424a32ae5e1433","user":{"login":"skeees","id":195769,"node_id":"MDQ6VXNlcjE5NTc2OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/195769?v=4","gravatar_id":"","url":"https://api.github.com/users/skeees","html_url":"https://github.com/skeees","followers_url":"https://api.github.com/users/skeees/followers","following_url":"https://api.github.com/users/skeees/following{/other_user}","gists_url":"https://api.github.com/users/skeees/gists{/gist_id}","starred_url":"https://api.github.com/users/skeees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeees/subscriptions","organizations_url":"https://api.github.com/users/skeees/orgs","repos_url":"https://api.github.com/users/skeees/repos","events_url":"https://api.github.com/users/skeees/events{/privacy}","received_events_url":"https://api.github.com/users/skeees/received_events","type":"User","site_admin":false},"repo":{"id":118956449,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg5NTY0NDk=","name":"bitcoin","full_name":"skeees/bitcoin","owner":{"login":"skeees","id":195769,"node_id":"MDQ6VXNlcjE5NTc2OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/195769?v=4","gravatar_id":"","url":"https://api.github.com/users/skeees","html_url":"https://github.com/skeees","followers_url":"https://api.github.com/users/skeees/followers","following_url":"https://api.github.com/users/skeees/following{/other_user}","gists_url":"https://api.github.com/users/skeees/gists{/gist_id}","starred_url":"https://api.github.com/users/skeees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeees/subscriptions","organizations_url":"https://api.github.com/users/skeees/orgs","repos_url":"https://api.github.com/users/skeees/repos","events_url":"https://api.github.com/users/skeees/events{/privacy}","received_events_url":"https://api.github.com/users/skeees/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skeees/bitcoin","description":"Bitcoin Core integration/staging tree","fork":true,"url":"https://api.github.com/repos/skeees/bitcoin","forks_url":"https://api.github.com/repos/skeees/bitcoin/forks","keys_url":"https://api.github.com/repos/skeees/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skeees/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skeees/bitcoin/teams","hooks_url":"https://api.github.com/repos/skeees/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/skeees/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/skeees/bitcoin/events","assignees_url":"https://api.github.com/repos/skeees/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/skeees/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/skeees/bitcoin/tags","blobs_url":"https://api.github.com/repos/skeees/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skeees/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skeees/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/skeees/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skeees/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/skeees/bitcoin/languages","stargazers_url":"https://api.github.com/repos/skeees/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/skeees/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/skeees/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/skeees/bitcoin/subscription","commits_url":"https://api.github.com/repos/skeees/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/skeees/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/skeees/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/skeees/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/skeees/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/skeees/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skeees/bitcoin/merges","archive_url":"https://api.github.com/repos/skeees/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skeees/bitcoin/downloads","issues_url":"https://api.github.com/repos/skeees/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/skeees/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/skeees/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/skeees/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skeees/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/skeees/bitcoin/releases{/id}","deployments_url":"https://api.github.com/repos/skeees/bitcoin/deployments","created_at":"2018-01-25T19:15:49Z","updated_at":"2018-08-21T18:59:56Z","pushed_at":"2018-08-26T15:32:29Z","git_url":"git://github.com/skeees/bitcoin.git","ssh_url":"git@github.com:skeees/bitcoin.git","clone_url":"https://github.com/skeees/bitcoin.git","svn_url":"https://github.com/skeees/bitcoin","homepage":"https://bitcoin.org/en/download","size":109295,"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":"master"}},"base":{"label":"bitcoin:master","ref":"master","sha":"427253cf7e19ed9ef86b45457de41e345676c88e","user":{"login":"bitcoin","id":528860,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyODg2MA==","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,"node_id":"MDEwOlJlcG9zaXRvcnkxMTgxOTI3","name":"bitcoin","full_name":"bitcoin/bitcoin","owner":{"login":"bitcoin","id":528860,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyODg2MA==","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-08-26T22:54:29Z","pushed_at":"2018-08-26T21:17:09Z","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://bitcoincore.org/en/download","size":111566,"stargazers_count":34268,"watchers_count":34268,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":20734,"mirror_url":null,"archived":false,"open_issues_count":865,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":20734,"open_issues":865,"watchers":34268,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/14072"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/14072"},"issue":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/14072"},"comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/14072/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/14072/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/14072/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bitcoin/statuses/ffb0adde09b17a19388bb2a906424a32ae5e1433"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"MarcoFalke"}}