Skip to content

Commit 8502b20

Browse files
committed
Unify help text for GetWarnings output in get*info RPCs
1 parent f77f0e4 commit 8502b20

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/rpc/blockchain.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "util.h"
2525
#include "utilstrencodings.h"
2626
#include "hash.h"
27+
#include "warnings.h"
2728

2829
#include <stdint.h>
2930

@@ -1162,7 +1163,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
11621163
" }\n"
11631164
" }\n"
11641165
" }\n"
1165-
" \"warnings\" : \"...\", (string) any network and blockchain errors.\n"
1166+
" \"warnings\" : \"...\", (string) any network and blockchain warnings.\n"
11661167
"}\n"
11671168
"\nExamples:\n"
11681169
+ HelpExampleCli("getblockchaininfo", "")

src/rpc/mining.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@ UniValue getmininginfo(const JSONRPCRequest& request)
199199
" \"currentblockweight\": nnn, (numeric) The last block weight\n"
200200
" \"currentblocktx\": nnn, (numeric) The last block transaction\n"
201201
" \"difficulty\": xxx.xxxxx (numeric) The current difficulty\n"
202-
" \"errors\": \"...\" (string) Current errors\n"
203202
" \"networkhashps\": nnn, (numeric) The network hashes per second\n"
204203
" \"pooledtx\": n (numeric) The size of the mempool\n"
205204
" \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n"
205+
" \"errors\": \"...\" (string) (string) any network and blockchain warnings\n"
206206
"}\n"
207207
"\nExamples:\n"
208208
+ HelpExampleCli("getmininginfo", "")
@@ -217,10 +217,10 @@ UniValue getmininginfo(const JSONRPCRequest& request)
217217
obj.push_back(Pair("currentblockweight", (uint64_t)nLastBlockWeight));
218218
obj.push_back(Pair("currentblocktx", (uint64_t)nLastBlockTx));
219219
obj.push_back(Pair("difficulty", (double)GetDifficulty()));
220-
obj.push_back(Pair("errors", GetWarnings("statusbar")));
221220
obj.push_back(Pair("networkhashps", getnetworkhashps(request)));
222221
obj.push_back(Pair("pooledtx", (uint64_t)mempool.size()));
223222
obj.push_back(Pair("chain", Params().NetworkIDString()));
223+
obj.push_back(Pair("errors", GetWarnings("statusbar")));
224224
return obj;
225225
}
226226

src/rpc/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ UniValue getnetworkinfo(const JSONRPCRequest& request)
447447
" }\n"
448448
" ,...\n"
449449
" ]\n"
450-
" \"warnings\": \"...\" (string) any network warnings\n"
450+
" \"warnings\": \"...\" (string) any network and blockchain warnings\n"
451451
"}\n"
452452
"\nExamples:\n"
453453
+ HelpExampleCli("getnetworkinfo", "")

0 commit comments

Comments
 (0)