Merge #17417: [0.19] cli: fix -getinfo output when compiled with no wallet

2d0b3c0716 cli: fix -getinfo output when compiled with no wallet (fanquake)

Pull request description:

  Backports #17368 to the 0.19 branch.

ACKs for top commit:
  laanwj:
    ACK 2d0b3c0716, this is a clean backport of #17368 / 3d05d33 and contains the necessary metadata.

Tree-SHA512: 7773a1038df385ca3114454800142fb3c44b06894175641e596a17214f8e83b326ea049d8908d6ff7c6e56b07e671216196d2bb964401a6b5e0ec1e632fc8b89
This commit is contained in:
Wladimir J. van der Laan 2019-11-10 12:07:55 +01:00
commit c7c8e3e072
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D

View file

@ -262,7 +262,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"]);