Added fields that were missing from a few of the basic info rpc requests.
getwalletinfo
- paytxfee
getnetworkinfo
- warnings
Added fields that were missing from a few of the basic info rpc requests.
getwalletinfo
getnetworkinfo
utACK for the paytxfee in getwalletinfo.
Tend to NACK the errors extending. The errors are mostly warnings and i think it won't make sense to add them to serval rpc commands.
I think a good example of how the errors field could get handled is the signrawtransaction rpc call.
The getinfo rpc call is not e good example IMO.
@jonasschnelli I agree that errors shouldn't be added to multiple RPC calls. It does belong on one other RPC call though as otherwise it would disappear when the deprecated getinfo is removed.
(same for version, and )protocolversion
Edit: protocolversion is already on getnetworkinfo, I forgot.
It just came to my mind that there is also the possibility of adding general information "one level above JSON" and that would mean add a custom HTTP response header (X-Bitcoin-Version, etc.). But not sure if this is a good idea.
@jonasschnelli Sounds like a good idea, but it may be harder to get at in some client implementations. It doesn't exclude including the version on some RPC call.
@jonasschnelli which one RPC call do you think the errors flag from getinfo should be included in, then? Maybe errors isn't the best name, could be alert or alerts?
@scmorse: at the moment, the general error states (actually mostly warnings) can be loaded over the getinfo() call (which is okay IMO). It should be named "warnings", but changing this would break the API (which should be avoided).
My recommendation would be to just add the paytxfee field as you did and remove all the "error" changes. Or do you see a benefit in having the error object in getblockchaininfo and getnetworkinfo?
Let's put it in getnetworkinfo. Nearly all the alerts come from the network or at least signal network conditions.
@laanwj @jonasschnelli Updated getnetworkinfo to have a "warnings" field and getwalletinfo to include the "paytxfee".
utACK.
Something for another PR would be to rename the "statusbar" warnings category to just "status" or something to avoid that one could think this is for UI only. But really really a minor low prio thing.
utACK.
I'd say don't bother renaming the category in this pull. I agree it's named wrongly and it's weird to pass in a string there anyway (should be an enum). Also the other category "rpc" is never used except to detect "safe mode" in OnRPCPreCommand by checking if the string is empty, which is also quite strange. It's very weird code so renaming the category wouldn't do it justice :)