Add warnings field to getblockchaininfo
This commit is contained in:
parent
ef8340d25f
commit
f77f0e4825
2 changed files with 3 additions and 0 deletions
|
@ -1162,6 +1162,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
|
||||||
" }\n"
|
" }\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
|
" \"warnings\" : \"...\", (string) any network and blockchain errors.\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
+ HelpExampleCli("getblockchaininfo", "")
|
+ HelpExampleCli("getblockchaininfo", "")
|
||||||
|
@ -1201,6 +1202,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
|
||||||
|
|
||||||
obj.push_back(Pair("pruneheight", block->nHeight));
|
obj.push_back(Pair("pruneheight", block->nHeight));
|
||||||
}
|
}
|
||||||
|
obj.push_back(Pair("warnings", GetWarnings("statusbar")));
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ class BlockchainTest(BitcoinTestFramework):
|
||||||
'pruned',
|
'pruned',
|
||||||
'softforks',
|
'softforks',
|
||||||
'verificationprogress',
|
'verificationprogress',
|
||||||
|
'warnings',
|
||||||
]
|
]
|
||||||
res = self.nodes[0].getblockchaininfo()
|
res = self.nodes[0].getblockchaininfo()
|
||||||
# result should have pruneheight and default keys if pruning is enabled
|
# result should have pruneheight and default keys if pruning is enabled
|
||||||
|
|
Loading…
Add table
Reference in a new issue