Skip to content

Commit f77f0e4

Browse files
committed
Add warnings field to getblockchaininfo
1 parent ef8340d commit f77f0e4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/rpc/blockchain.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
11621162
" }\n"
11631163
" }\n"
11641164
" }\n"
1165+
" \"warnings\" : \"...\", (string) any network and blockchain errors.\n"
11651166
"}\n"
11661167
"\nExamples:\n"
11671168
+ HelpExampleCli("getblockchaininfo", "")
@@ -1201,6 +1202,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
12011202

12021203
obj.push_back(Pair("pruneheight", block->nHeight));
12031204
}
1205+
obj.push_back(Pair("warnings", GetWarnings("statusbar")));
12041206
return obj;
12051207
}
12061208

test/functional/blockchain.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def _test_getblockchaininfo(self):
6060
'pruned',
6161
'softforks',
6262
'verificationprogress',
63+
'warnings',
6364
]
6465
res = self.nodes[0].getblockchaininfo()
6566
# result should have pruneheight and default keys if pruning is enabled

0 commit comments

Comments
 (0)