{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/4793","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/4793/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/4793/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/4793/events","html_url":"https://github.com/bitcoin/bitcoin/pull/4793","id":41560280,"number":4793,"title":"Pow: Refactor: Encapsulate miner-related pow in GenerateProof (was ScanHash) and use it for regtest mining","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},"labels":[{"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Improvement","name":"Improvement","color":"E6F6D6"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":28,"created_at":"2014-08-30T10:10:31Z","updated_at":"2015-05-06T15:05:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/4793","html_url":"https://github.com/bitcoin/bitcoin/pull/4793","diff_url":"https://github.com/bitcoin/bitcoin/pull/4793.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/4793.patch"},"body":"Continues #4506.\r\nFollowing @laanwj 's advice of only moving ScanHash, I found another solution to encapsulate the miner's pow without removing the miner's optimization, which was rejected in #4423 \r\nBut I would like to slightly change the behavior.\r\nCommit \"Replace proof.nNonce >= 0xffff000 with an iteration counter\" should be either rejected or squashed into \"proof.nNonce >= 0xffff0000 -> proof.OutOfRangeSolution()\" (and of course that 1000 in the for is open for bike-shedding).\r\n\"Small miner optimization\" also should be rejected or rebased in \"Remove testnet's special case from miner.cpp\".\r\nI think these 2 functional changes are meaningless enough that can be safely accepted.\r\nI would also be happy to just remove the hashmeter and the resulting PR would be simpler."},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/99505259","html_url":"https://github.com/bitcoin/bitcoin/pull/4793#issuecomment-99505259","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/4793","id":99505259,"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},"created_at":"2015-05-06T15:05:50Z","updated_at":"2015-05-06T15:05:50Z","body":"Most of the comments in this PR do not seem to apply to the actual code change here anymore. \r\n\r\nWhat is the motivation for this change?"}}