{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/27191612","id":27191612,"diff_hunk":"@@ -7,34 +7,33 @@\n \n #include \"arith_uint256.h\"\n #include \"chain.h\"\n-#include \"chainparams.h\"\n #include \"primitives/block.h\"\n #include \"uint256.h\"\n #include \"util.h\"\n \n-unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock)\n+unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock, const Consensus::Params& params)","path":"src/pow.cpp","position":10,"original_position":10,"commit_id":"d698ef690f62c08676dcf9ddc0988e23aa81cbff","original_commit_id":"d698ef690f62c08676dcf9ddc0988e23aa81cbff","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":"Kudos for passing these parameters explicitly instead of referring to global Params(), breaking the dependency on a global parameter setting will make e.g. testing easier.","created_at":"2015-03-26T06:51:04Z","updated_at":"2015-03-26T06:51:04Z","html_url":"https://github.com/bitcoin/bitcoin/pull/5812#discussion_r27191612","pull_request_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/5812","_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/27191612"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/5812#discussion_r27191612"},"pull_request":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/5812"}}},"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/5812","id":29747678,"html_url":"https://github.com/bitcoin/bitcoin/pull/5812","diff_url":"https://github.com/bitcoin/bitcoin/pull/5812.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/5812.patch","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/5812","number":5812,"state":"open","locked":false,"title":"Consensus: Refactor: Decouple pow from chainparams","user":{"login":"jtimon","id":1008458,"avatar_url":"https://avatars.githubusercontent.com/u/1008458?v=3","gravatar_id":"","url":"https://api.github.com/users/jtimon","html_url":"https://github.com/jtimon","followers_url":"https://api.github.com/users/jtimon/followers","following_url":"https://api.github.com/users/jtimon/following{/other_user}","gists_url":"https://api.github.com/users/jtimon/gists{/gist_id}","starred_url":"https://api.github.com/users/jtimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtimon/subscriptions","organizations_url":"https://api.github.com/users/jtimon/orgs","repos_url":"https://api.github.com/users/jtimon/repos","events_url":"https://api.github.com/users/jtimon/events{/privacy}","received_events_url":"https://api.github.com/users/jtimon/received_events","type":"User","site_admin":false},"body":"Introduce a Consensus::Params struct with only consensus specific params. This will be useful for more consensus refactors (see https://github.com/jtimon/bitcoin/commits/consensus_tip). \r\nThen use it in proof of work related methods (which are part of the consensus).","created_at":"2015-02-21T03:03:53Z","updated_at":"2015-03-26T06:51:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a207e8f44d5a71b6f6e36adab573a2cc5165d83","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/5812/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/5812/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/5812/comments","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/d698ef690f62c08676dcf9ddc0988e23aa81cbff","head":{"label":"jtimon:consensuspow","ref":"consensuspow","sha":"d698ef690f62c08676dcf9ddc0988e23aa81cbff","user":{"login":"jtimon","id":1008458,"avatar_url":"https://avatars.githubusercontent.com/u/1008458?v=3","gravatar_id":"","url":"https://api.github.com/users/jtimon","html_url":"https://github.com/jtimon","followers_url":"https://api.github.com/users/jtimon/followers","following_url":"https://api.github.com/users/jtimon/following{/other_user}","gists_url":"https://api.github.com/users/jtimon/gists{/gist_id}","starred_url":"https://api.github.com/users/jtimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtimon/subscriptions","organizations_url":"https://api.github.com/users/jtimon/orgs","repos_url":"https://api.github.com/users/jtimon/repos","events_url":"https://api.github.com/users/jtimon/events{/privacy}","received_events_url":"https://api.github.com/users/jtimon/received_events","type":"User","site_admin":false},"repo":{"id":17504501,"name":"bitcoin","full_name":"jtimon/bitcoin","owner":{"login":"jtimon","id":1008458,"avatar_url":"https://avatars.githubusercontent.com/u/1008458?v=3","gravatar_id":"","url":"https://api.github.com/users/jtimon","html_url":"https://github.com/jtimon","followers_url":"https://api.github.com/users/jtimon/followers","following_url":"https://api.github.com/users/jtimon/following{/other_user}","gists_url":"https://api.github.com/users/jtimon/gists{/gist_id}","starred_url":"https://api.github.com/users/jtimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtimon/subscriptions","organizations_url":"https://api.github.com/users/jtimon/orgs","repos_url":"https://api.github.com/users/jtimon/repos","events_url":"https://api.github.com/users/jtimon/events{/privacy}","received_events_url":"https://api.github.com/users/jtimon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jtimon/bitcoin","description":"Bitcoin Core integration/staging tree","fork":true,"url":"https://api.github.com/repos/jtimon/bitcoin","forks_url":"https://api.github.com/repos/jtimon/bitcoin/forks","keys_url":"https://api.github.com/repos/jtimon/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jtimon/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jtimon/bitcoin/teams","hooks_url":"https://api.github.com/repos/jtimon/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/jtimon/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/jtimon/bitcoin/events","assignees_url":"https://api.github.com/repos/jtimon/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/jtimon/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/jtimon/bitcoin/tags","blobs_url":"https://api.github.com/repos/jtimon/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jtimon/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jtimon/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jtimon/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jtimon/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/jtimon/bitcoin/languages","stargazers_url":"https://api.github.com/repos/jtimon/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/jtimon/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/jtimon/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/jtimon/bitcoin/subscription","commits_url":"https://api.github.com/repos/jtimon/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jtimon/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jtimon/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jtimon/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jtimon/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/jtimon/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jtimon/bitcoin/merges","archive_url":"https://api.github.com/repos/jtimon/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jtimon/bitcoin/downloads","issues_url":"https://api.github.com/repos/jtimon/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/jtimon/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/jtimon/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/jtimon/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jtimon/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/jtimon/bitcoin/releases{/id}","created_at":"2014-03-07T06:02:15Z","updated_at":"2014-07-27T14:54:19Z","pushed_at":"2015-03-25T23:48:14Z","git_url":"git://github.com/jtimon/bitcoin.git","ssh_url":"git@github.com:jtimon/bitcoin.git","clone_url":"https://github.com/jtimon/bitcoin.git","svn_url":"https://github.com/jtimon/bitcoin","homepage":"https://bitcoin.org/en/download","size":48097,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":"cbb2cf5522983e4a952cfb25e577b1998a06c769","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}","created_at":"2010-12-19T15:16:43Z","updated_at":"2015-03-26T05:45:18Z","pushed_at":"2015-03-26T00:06:07Z","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":112043,"stargazers_count":6678,"watchers_count":6678,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":4680,"mirror_url":null,"open_issues_count":444,"forks":4680,"open_issues":444,"watchers":6678,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/5812"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/5812"},"issue":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/5812"},"comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/5812/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/5812/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/5812/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bitcoin/statuses/d698ef690f62c08676dcf9ddc0988e23aa81cbff"}}}}