aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2019-11-06 11:07:07 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2019-11-06 11:07:12 +0100
commit7967104aee055476107dc17265cefc4ae4e75378 (patch)
tree922483a115c024d75d066af529f424b5ecdd453d
parent224c19645fa0478112ea0129a75ba0097caa55ad (diff)
parent3d05d332693ec860626fc77e6ba50dec94e4e83c (diff)
Merge #17368: cli: fix -getinfo output when compiled with no wallet
3d05d332693ec860626fc77e6ba50dec94e4e83c cli: fix -getinfo output when compiled with no wallet (fanquake) Pull request description: master (33b155f28732487854cf0ca29ca17c50f8c6872e): ```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 (3d05d332693ec860626fc77e6ba50dec94e4e83c): ```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 3d05d332693ec860626fc77e6ba50dec94e4e83c laanwj: ACK 3d05d332693ec860626fc77e6ba50dec94e4e83c darosior: ACK 3d05d332693ec860626fc77e6ba50dec94e4e83c Tree-SHA512: 055424e122a082cbfea410da287d9ceb7ed405fd68d53e2f5bef62beea80bc374a7d00366de0479d23faecb7f063b232aca52e9fdbdb97c58ddf46e7749136a9
-rw-r--r--src/bitcoin-cli.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index d7b6891503..592fcbe8dd 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -265,7 +265,7 @@ public:
result.pushKV("proxy", batch[ID_NETWORKINFO]["result"]["networks"][0]["proxy"]);
result.pushKV("difficulty", batch[ID_BLOCKCHAININFO]["result"]["difficulty"]);
result.pushKV("chain", UniValue(batch[ID_BLOCKCHAININFO]["result"]["chain"]));
- if (!batch[ID_WALLETINFO].isNull()) {
+ if (!batch[ID_WALLETINFO]["result"].isNull()) {
result.pushKV("walletversion", batch[ID_WALLETINFO]["result"]["walletversion"]);
result.pushKV("balance", batch[ID_WALLETINFO]["result"]["balance"]);
result.pushKV("keypoololdest", batch[ID_WALLETINFO]["result"]["keypoololdest"]);