Browse Source

Unify help text for GetWarnings output in get*info RPCs

0.16
Andrew Chow 8 years ago
parent
commit
8502b20852
  1. 3
      src/rpc/blockchain.cpp
  2. 4
      src/rpc/mining.cpp
  3. 2
      src/rpc/net.cpp

3
src/rpc/blockchain.cpp

@ -24,6 +24,7 @@
#include "util.h" #include "util.h"
#include "utilstrencodings.h" #include "utilstrencodings.h"
#include "hash.h" #include "hash.h"
#include "warnings.h"
#include <stdint.h> #include <stdint.h>
@ -1162,7 +1163,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
" }\n" " }\n"
" }\n" " }\n"
" }\n" " }\n"
" \"warnings\" : \"...\", (string) any network and blockchain errors.\n" " \"warnings\" : \"...\", (string) any network and blockchain warnings.\n"
"}\n" "}\n"
"\nExamples:\n" "\nExamples:\n"
+ HelpExampleCli("getblockchaininfo", "") + HelpExampleCli("getblockchaininfo", "")

4
src/rpc/mining.cpp

@ -199,10 +199,10 @@ UniValue getmininginfo(const JSONRPCRequest& request)
" \"currentblockweight\": nnn, (numeric) The last block weight\n" " \"currentblockweight\": nnn, (numeric) The last block weight\n"
" \"currentblocktx\": nnn, (numeric) The last block transaction\n" " \"currentblocktx\": nnn, (numeric) The last block transaction\n"
" \"difficulty\": xxx.xxxxx (numeric) The current difficulty\n" " \"difficulty\": xxx.xxxxx (numeric) The current difficulty\n"
" \"errors\": \"...\" (string) Current errors\n"
" \"networkhashps\": nnn, (numeric) The network hashes per second\n" " \"networkhashps\": nnn, (numeric) The network hashes per second\n"
" \"pooledtx\": n (numeric) The size of the mempool\n" " \"pooledtx\": n (numeric) The size of the mempool\n"
" \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n" " \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n"
" \"errors\": \"...\" (string) (string) any network and blockchain warnings\n"
"}\n" "}\n"
"\nExamples:\n" "\nExamples:\n"
+ HelpExampleCli("getmininginfo", "") + HelpExampleCli("getmininginfo", "")
@ -217,10 +217,10 @@ UniValue getmininginfo(const JSONRPCRequest& request)
obj.push_back(Pair("currentblockweight", (uint64_t)nLastBlockWeight)); obj.push_back(Pair("currentblockweight", (uint64_t)nLastBlockWeight));
obj.push_back(Pair("currentblocktx", (uint64_t)nLastBlockTx)); obj.push_back(Pair("currentblocktx", (uint64_t)nLastBlockTx));
obj.push_back(Pair("difficulty", (double)GetDifficulty())); obj.push_back(Pair("difficulty", (double)GetDifficulty()));
obj.push_back(Pair("errors", GetWarnings("statusbar")));
obj.push_back(Pair("networkhashps", getnetworkhashps(request))); obj.push_back(Pair("networkhashps", getnetworkhashps(request)));
obj.push_back(Pair("pooledtx", (uint64_t)mempool.size())); obj.push_back(Pair("pooledtx", (uint64_t)mempool.size()));
obj.push_back(Pair("chain", Params().NetworkIDString())); obj.push_back(Pair("chain", Params().NetworkIDString()));
obj.push_back(Pair("errors", GetWarnings("statusbar")));
return obj; return obj;
} }

2
src/rpc/net.cpp

@ -447,7 +447,7 @@ UniValue getnetworkinfo(const JSONRPCRequest& request)
" }\n" " }\n"
" ,...\n" " ,...\n"
" ]\n" " ]\n"
" \"warnings\": \"...\" (string) any network warnings\n" " \"warnings\": \"...\" (string) any network and blockchain warnings\n"
"}\n" "}\n"
"\nExamples:\n" "\nExamples:\n"
+ HelpExampleCli("getnetworkinfo", "") + HelpExampleCli("getnetworkinfo", "")

Loading…
Cancel
Save