Skip to content

Commit 1c9b818

Browse files
committed
getinfo deprecation warning
1 parent 0b01935 commit 1c9b818

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/rpc/misc.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,23 @@ UniValue getinfo(const JSONRPCRequest& request)
5050
"\nDEPRECATED. Returns an object containing various state info.\n"
5151
"\nResult:\n"
5252
"{\n"
53+
" \"deprecation-warning\": \"...\" (string) warning that the getinfo command is deprecated and will be removed in 0.16\n"
5354
" \"version\": xxxxx, (numeric) the server version\n"
5455
" \"protocolversion\": xxxxx, (numeric) the protocol version\n"
5556
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
5657
" \"balance\": xxxxxxx, (numeric) the total bitcoin balance of the wallet\n"
5758
" \"blocks\": xxxxxx, (numeric) the current number of blocks processed in the server\n"
5859
" \"timeoffset\": xxxxx, (numeric) the time offset\n"
5960
" \"connections\": xxxxx, (numeric) the number of connections\n"
60-
" \"proxy\": \"host:port\", (string, optional) the proxy used by the server\n"
61+
" \"proxy\": \"host:port\", (string, optional) the proxy used by the server\n"
6162
" \"difficulty\": xxxxxx, (numeric) the current difficulty\n"
6263
" \"testnet\": true|false, (boolean) if the server is using testnet or not\n"
6364
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool\n"
6465
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
6566
" \"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"
6667
" \"paytxfee\": x.xxxx, (numeric) the transaction fee set in " + CURRENCY_UNIT + "/kB\n"
6768
" \"relayfee\": x.xxxx, (numeric) minimum relay fee for transactions in " + CURRENCY_UNIT + "/kB\n"
68-
" \"errors\": \"...\" (string) any error messages\n"
69+
" \"errors\": \"...\" (string) any error messages\n"
6970
"}\n"
7071
"\nExamples:\n"
7172
+ HelpExampleCli("getinfo", "")
@@ -84,6 +85,8 @@ UniValue getinfo(const JSONRPCRequest& request)
8485
GetProxy(NET_IPV4, proxy);
8586

8687
UniValue obj(UniValue::VOBJ);
88+
obj.push_back(Pair("deprecation-warning", "WARNING: getinfo is deprecated and will be fully removed in 0.16."
89+
" Projects should transition to using getblockchaininfo, getnetworkinfo, and getwalletinfo before upgrading to 0.16"));
8790
obj.push_back(Pair("version", CLIENT_VERSION));
8891
obj.push_back(Pair("protocolversion", PROTOCOL_VERSION));
8992
#ifdef ENABLE_WALLET

0 commit comments

Comments
 (0)