Skip to content

Commit 7967104

Browse files
committed
Merge #17368: cli: fix -getinfo output when compiled with no wallet
3d05d33 cli: fix -getinfo output when compiled with no wallet (fanquake) Pull request description: master (33b155f): ```bash src/bitcoin-cli -getinfo { "version": 199900, "protocolversion": 70015, "blocks": 602348, "headers": 602348, "verificationprogress": 0.9999995592310106, "timeoffset": 0, "connections": 10, "proxy": "", "difficulty": 13691480038694.45, "chain": "main", "walletversion": null, "balance": null, "keypoololdest": null, "keypoolsize": null, "paytxfee": null, "relayfee": 0.00001000, "warnings": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications" } ``` This PR (3d05d33): ```bash { "version": 199900, "protocolversion": 70015, "blocks": 602348, "headers": 602348, "verificationprogress": 0.9999996313568186, "timeoffset": 0, "connections": 10, "proxy": "", "difficulty": 13691480038694.45, "chain": "main", "relayfee": 0.00001000, "warnings": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications" } ``` ACKs for top commit: MarcoFalke: ouch ACK 3d05d33 laanwj: ACK 3d05d33 darosior: ACK 3d05d33 Tree-SHA512: 055424e122a082cbfea410da287d9ceb7ed405fd68d53e2f5bef62beea80bc374a7d00366de0479d23faecb7f063b232aca52e9fdbdb97c58ddf46e7749136a9
2 parents 224c196 + 3d05d33 commit 7967104

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bitcoin-cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ class GetinfoRequestHandler: public BaseRequestHandler
265265
result.pushKV("proxy", batch[ID_NETWORKINFO]["result"]["networks"][0]["proxy"]);
266266
result.pushKV("difficulty", batch[ID_BLOCKCHAININFO]["result"]["difficulty"]);
267267
result.pushKV("chain", UniValue(batch[ID_BLOCKCHAININFO]["result"]["chain"]));
268-
if (!batch[ID_WALLETINFO].isNull()) {
268+
if (!batch[ID_WALLETINFO]["result"].isNull()) {
269269
result.pushKV("walletversion", batch[ID_WALLETINFO]["result"]["walletversion"]);
270270
result.pushKV("balance", batch[ID_WALLETINFO]["result"]["balance"]);
271271
result.pushKV("keypoololdest", batch[ID_WALLETINFO]["result"]["keypoololdest"]);

0 commit comments

Comments
 (0)