refactoring CRPCCommand changing the type of its member category from std::string to a typedef enum ERPCCategory.
The behaviour should be exactly the same with a very very small, in any way irrelevant, speed dump.
I 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.
For 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
Thanks, Isidoro Ghezzi
p.s:
- Take care on the fact, that I had no warning assigning the enum to a std::string :-(
Also 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. - I tested only on
regtestandmacOS
EDITs:
- Using
enum classit’s giving right error trying to assign by mistake to a std::string :-) https://github.com/bitcoin/bitcoin/pull/13945/commits/cf190f57a078df1d37bd1822e3fa69ba0d9c90e6 - I tested on
regtestonubuntuandmacOS - I never tested nor compiled on windows.