{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6068","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6068/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6068/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6068/events","html_url":"https://github.com/bitcoin/bitcoin/pull/6068","id":71076876,"number":6068,"title":"Policy: Create CPolicy interface and CStandardPolicy class implementing it","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/Refactoring","name":"Refactoring","color":"E6F6D6"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":40,"created_at":"2015-04-26T14:31:07Z","updated_at":"2015-08-21T02:09:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6068","html_url":"https://github.com/bitcoin/bitcoin/pull/6068","diff_url":"https://github.com/bitcoin/bitcoin/pull/6068.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/6068.patch"},"body":"This is a reopen of #5595. Even though I knew I had to reopen it before force-pushing to it, I forgot about it. I think I solved this problem once by pushing the old branch back, reopening and then pushing the new branch, but the first step doesn't seem to be working. I'm happy to close this and reopen #5595 if somebody give me a solution.\r\n\r\nText from the other PR:\r\n\r\nFirst steps for encapsulating the policy code.\r\nAn interface (abstract class) CPolicy and a concrete implementation CStandardPolicy are created.\r\n\"Users\" (people capable of modify and build Bitcoin core) can implement alternative policies and select them with the option -policy=<policy_name>. They can define new policy options and make their help messages be accesible to the users without having to touch init.cpp, only modifying policy.cpp is enough for all this. The help messages can also be accessed (per available policy) as a vector of string pairs to make it easier to implement a GUI to configure those options (although I don't plan to do that myself).\r\nAs more parts of the policy code move to policy.cpp, this encapsulation gets more useful.\r\n\r\nTo start using it. The function script/standard.o::IsStandard() is turned into a method: ApproveScript().\r\nMany more policy-related improvements can be cleanly proposed after this first steps are merged.\r\n"},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/133246418","html_url":"https://github.com/bitcoin/bitcoin/pull/6068#issuecomment-133246418","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6068","id":133246418,"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},"created_at":"2015-08-21T02:09:37Z","updated_at":"2015-08-21T02:09:37Z","body":"Needed rebase."}}