{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/13945","repository_url":"https://api.github.com/repos/bitcoin/bitcoin","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/13945/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/13945/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/13945/events","html_url":"https://github.com/bitcoin/bitcoin/pull/13945","id":349770915,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3Nzk2OTE4","number":13945,"title":"Refactoring CRPCCommand with enum category","user":{"login":"isghe","id":1006078,"node_id":"MDQ6VXNlcjEwMDYwNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/1006078?v=4","gravatar_id":"","url":"https://api.github.com/users/isghe","html_url":"https://github.com/isghe","followers_url":"https://api.github.com/users/isghe/followers","following_url":"https://api.github.com/users/isghe/following{/other_user}","gists_url":"https://api.github.com/users/isghe/gists{/gist_id}","starred_url":"https://api.github.com/users/isghe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isghe/subscriptions","organizations_url":"https://api.github.com/users/isghe/orgs","repos_url":"https://api.github.com/users/isghe/repos","events_url":"https://api.github.com/users/isghe/events{/privacy}","received_events_url":"https://api.github.com/users/isghe/received_events","type":"User","site_admin":false},"labels":[{"id":98279177,"node_id":"MDU6TGFiZWw5ODI3OTE3Nw==","url":"https://api.github.com/repos/bitcoin/bitcoin/labels/RPC/REST/ZMQ","name":"RPC/REST/ZMQ","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":25,"created_at":"2018-08-11T23:21:07Z","updated_at":"2018-09-01T08:31:58Z","closed_at":"2018-09-01T08:31:58Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/13945","html_url":"https://github.com/bitcoin/bitcoin/pull/13945","diff_url":"https://github.com/bitcoin/bitcoin/pull/13945.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/13945.patch"},"body":"refactoring `CRPCCommand` changing the  type of its member `category` from `std::string` to a `typedef enum ERPCCategory`.\r\nThe behaviour should be exactly the same with a very very small, in any way irrelevant, speed dump.\r\n\r\nI am doing this, in preparation to add attributes, likes `visibility` and `state` to `CRPCCommand ` structure, to avoid using category names, for overridden informations like visibility or deprecation.\r\n\r\nFor example, from v0.16.0 the command `getinfo` switched its category from `control` to `hidden`, while I think the idea was to let it to `control` category, with attributes similar to `visibility = false` and `state = deprecated`\r\n\r\nThanks,\r\nIsidoro Ghezzi\r\n\r\np.s:\r\n* Take care on the fact, that I had no warning assigning the enum to a std::string :-(\r\nAlso take care I'm never testing on QT. (I simply never configure nor compile on QT); anyway I was able to catch the QT command `rpcNestedTest`.\r\n* I tested only on `regtest` and `macOS`\r\n\r\nEDITs: \r\n 1. Using `enum class` it's giving right error trying to assign by mistake to a std::string :-) https://github.com/bitcoin/bitcoin/pull/13945/commits/cf190f57a078df1d37bd1822e3fa69ba0d9c90e6\r\n2. I tested on `regtest` on `ubuntu` and `macOS`\r\n3. I never tested nor compiled on windows."},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/417842912","html_url":"https://github.com/bitcoin/bitcoin/pull/13945#issuecomment-417842912","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/13945","id":417842912,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzg0MjkxMg==","user":{"login":"laanwj","id":126646,"node_id":"MDQ6VXNlcjEyNjY0Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/126646?v=4","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":"2018-09-01T08:31:58Z","updated_at":"2018-09-01T08:31:58Z","author_association":"MEMBER","body":"Sorry, there seems to be no agreement to do this, in which case we prefer not making a change to the code.\r\nClosing."}}
{"actor":{"display_login":"laanwj"}}