Open ghost opened 7 years ago
Some are sending the request, and some not like json_getinfo(). But yes, a more structured methods list who can be called from the GUI can be nice.
I didn't see that one, but we could make all RPC commands have the same type. That one could just ignore its argument.
Now that the GUI has autocomplete for RPC commands, a good idea would be to have some data structure storing all those commands, so that the GUI would use that information too and cannot get outdated when a new command is added.
As all methods for implementing RPC commands have the same type, we could use a map from strings to functions. This huge if-else:
https://github.com/openvcash/vcash/blob/master/coin/src/rpc_connection.cpp#L520
could then be replaced with a single find on the map.