You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #10857: [RPC] Add a deprecation warning to getinfo's output
1c9b818 getinfo deprecation warning (Andrew Chow)
Pull request description:
This is an alternative to #10841
This PR implements @gmaxwell's suggestion of a `nag` field for getinfo which warns about the deprecation. Instead of calling it `nag`, I have named it `deprecation-warning`. The output of `getinfo` will look like this:
```
{
"version": 149900,
"protocolversion": 70015,
"walletversion": 139900,
"balance": 0.00000000,
"blocks": 476281,
"timeoffset": 0,
"connections": 2,
"proxy": "",
"difficulty": 804525194568.1318,
"testnet": false,
"keypoololdest": 1496858803,
"keypoolsize": 197,
"unlocked_until": 0,
"paytxfee": 0.00000000,
"relayfee": 0.00001000,
"errors": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications",
"deprecation-warning": "WARNING: getinfo is deprecated and will be fully removed in 0.16. Projects should transition to using getblockchaininfo, getnetworkinfo, and getwalletinfo before upgrading to 0.16"
}
```
I think this should be tagged for 0.15
Tree-SHA512: ea1bac96a67f797519e8748ddd661cf0a1127cbc38f145b98f10cf9b54dcf0519b353062ce9888e1f51875497299c75ff5147566944451bc3fc117620e773489
"\nDEPRECATED. Returns an object containing various state info.\n"
52
52
"\nResult:\n"
53
53
"{\n"
54
+
"\"deprecation-warning\": \"...\" (string) warning that the getinfo command is deprecated and will be removed in 0.16\n"
54
55
"\"version\": xxxxx, (numeric) the server version\n"
55
56
"\"protocolversion\": xxxxx, (numeric) the protocol version\n"
56
57
"\"walletversion\": xxxxx, (numeric) the wallet version\n"
57
58
"\"balance\": xxxxxxx, (numeric) the total bitcoin balance of the wallet\n"
58
59
"\"blocks\": xxxxxx, (numeric) the current number of blocks processed in the server\n"
59
60
"\"timeoffset\": xxxxx, (numeric) the time offset\n"
60
61
"\"connections\": xxxxx, (numeric) the number of connections\n"
61
-
"\"proxy\": \"host:port\", (string, optional) the proxy used by the server\n"
62
+
"\"proxy\": \"host:port\", (string, optional) the proxy used by the server\n"
62
63
"\"difficulty\": xxxxxx, (numeric) the current difficulty\n"
63
64
"\"testnet\": true|false, (boolean) if the server is using testnet or not\n"
64
65
"\"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool\n"
65
66
"\"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
66
67
"\"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n"
67
68
"\"paytxfee\": x.xxxx, (numeric) the transaction fee set in " + CURRENCY_UNIT + "/kB\n"
68
69
"\"relayfee\": x.xxxx, (numeric) minimum relay fee for transactions in " + CURRENCY_UNIT + "/kB\n"
69
-
"\"errors\": \"...\" (string) any error messages\n"
70
+
"\"errors\": \"...\"(string) any error messages\n"
0 commit comments