cli: Add "headers" and "verificationprogress" to -getinfo

These value are useful to know the current progress of
initial sync, or of catching up.
This commit is contained in:
Wladimir J. van der Laan 2019-10-29 18:29:13 +00:00 committed by Wladimir J. van der Laan
parent 6a97e8a060
commit 31879345ee

View File

@ -258,6 +258,8 @@ public:
result.pushKV("version", batch[ID_NETWORKINFO]["result"]["version"]);
result.pushKV("protocolversion", batch[ID_NETWORKINFO]["result"]["protocolversion"]);
result.pushKV("blocks", batch[ID_BLOCKCHAININFO]["result"]["blocks"]);
result.pushKV("headers", batch[ID_BLOCKCHAININFO]["result"]["headers"]);
result.pushKV("verificationprogress", batch[ID_BLOCKCHAININFO]["result"]["verificationprogress"]);
result.pushKV("timeoffset", batch[ID_NETWORKINFO]["result"]["timeoffset"]);
result.pushKV("connections", batch[ID_NETWORKINFO]["result"]["connections"]);
result.pushKV("proxy", batch[ID_NETWORKINFO]["result"]["networks"][0]["proxy"]);