diff options
author | Andrew Chow <achow101-github@achow101.com> | 2017-09-26 12:03:34 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2017-09-27 11:27:26 -0400 |
commit | 395cef7601479b97f5794b0c98067c859f00fc7f (patch) | |
tree | 049c02c832025cee4388f1de367af4234c290dba /src/rpc | |
parent | 8502b2085288bcf5b5ff96b77236a3b04c65f082 (diff) |
Change getmininginfo errors field to warnings
Changes the errors field to warnings. To maintain compatibility,
the errors field is deprecated and enabled by starting bitcoind with
-deprecatedrpc=getmininginfo
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/mining.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 85cc906b7b..f79439f038 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -202,7 +202,8 @@ UniValue getmininginfo(const JSONRPCRequest& request) " \"networkhashps\": nnn, (numeric) The network hashes per second\n" " \"pooledtx\": n (numeric) The size of the mempool\n" " \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n" - " \"errors\": \"...\" (string) (string) any network and blockchain warnings\n" + " \"warnings\": \"...\" (string) any network and blockchain warnings\n" + " \"errors\": \"...\" (string) DEPRECATED. Same as warnings. Only shown when bitcoind is started with -deprecatedrpc=getmininginfo\n" "}\n" "\nExamples:\n" + HelpExampleCli("getmininginfo", "") @@ -220,7 +221,11 @@ UniValue getmininginfo(const JSONRPCRequest& request) obj.push_back(Pair("networkhashps", getnetworkhashps(request))); obj.push_back(Pair("pooledtx", (uint64_t)mempool.size())); obj.push_back(Pair("chain", Params().NetworkIDString())); - obj.push_back(Pair("errors", GetWarnings("statusbar"))); + if (IsDeprecatedRPCEnabled("getmininginfo")) { + obj.push_back(Pair("errors", GetWarnings("statusbar"))); + } else { + obj.push_back(Pair("warnings", GetWarnings("statusbar"))); + } return obj; } |