Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoin-cli.cpp
Show First 20 Lines • Show All 316 Lines • ▼ Show 20 Lines | UniValue ProcessReply(const UniValue &batch_in) override { | ||||
// wallet. | // wallet. | ||||
if (!batch[ID_NETWORKINFO]["error"].isNull()) { | if (!batch[ID_NETWORKINFO]["error"].isNull()) { | ||||
return batch[ID_NETWORKINFO]; | return batch[ID_NETWORKINFO]; | ||||
} | } | ||||
if (!batch[ID_BLOCKCHAININFO]["error"].isNull()) { | if (!batch[ID_BLOCKCHAININFO]["error"].isNull()) { | ||||
return batch[ID_BLOCKCHAININFO]; | return batch[ID_BLOCKCHAININFO]; | ||||
} | } | ||||
result.pushKV("version", batch[ID_NETWORKINFO]["result"]["version"]); | 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("blocks", batch[ID_BLOCKCHAININFO]["result"]["blocks"]); | ||||
result.pushKV("headers", batch[ID_BLOCKCHAININFO]["result"]["headers"]); | result.pushKV("headers", batch[ID_BLOCKCHAININFO]["result"]["headers"]); | ||||
result.pushKV( | result.pushKV( | ||||
"verificationprogress", | "verificationprogress", | ||||
batch[ID_BLOCKCHAININFO]["result"]["verificationprogress"]); | batch[ID_BLOCKCHAININFO]["result"]["verificationprogress"]); | ||||
result.pushKV("timeoffset", | result.pushKV("timeoffset", | ||||
batch[ID_NETWORKINFO]["result"]["timeoffset"]); | batch[ID_NETWORKINFO]["result"]["timeoffset"]); | ||||
result.pushKV("connections", | result.pushKV("connections", | ||||
batch[ID_NETWORKINFO]["result"]["connections"]); | batch[ID_NETWORKINFO]["result"]["connections"]); | ||||
result.pushKV("proxy", | result.pushKV("proxy", | ||||
batch[ID_NETWORKINFO]["result"]["networks"][0]["proxy"]); | batch[ID_NETWORKINFO]["result"]["networks"][0]["proxy"]); | ||||
result.pushKV("difficulty", | result.pushKV("difficulty", | ||||
batch[ID_BLOCKCHAININFO]["result"]["difficulty"]); | batch[ID_BLOCKCHAININFO]["result"]["difficulty"]); | ||||
result.pushKV("chain", | result.pushKV("chain", | ||||
UniValue(batch[ID_BLOCKCHAININFO]["result"]["chain"])); | UniValue(batch[ID_BLOCKCHAININFO]["result"]["chain"])); | ||||
if (!batch[ID_WALLETINFO]["result"].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("balance", batch[ID_WALLETINFO]["result"]["balance"]); | ||||
result.pushKV("keypoololdest", | |||||
batch[ID_WALLETINFO]["result"]["keypoololdest"]); | |||||
result.pushKV("keypoolsize", | result.pushKV("keypoolsize", | ||||
batch[ID_WALLETINFO]["result"]["keypoolsize"]); | batch[ID_WALLETINFO]["result"]["keypoolsize"]); | ||||
if (!batch[ID_WALLETINFO]["result"]["unlocked_until"].isNull()) { | if (!batch[ID_WALLETINFO]["result"]["unlocked_until"].isNull()) { | ||||
result.pushKV("unlocked_until", | result.pushKV("unlocked_until", | ||||
batch[ID_WALLETINFO]["result"]["unlocked_until"]); | batch[ID_WALLETINFO]["result"]["unlocked_until"]); | ||||
} | } | ||||
result.pushKV("paytxfee", | result.pushKV("paytxfee", | ||||
batch[ID_WALLETINFO]["result"]["paytxfee"]); | batch[ID_WALLETINFO]["result"]["paytxfee"]); | ||||
▲ Show 20 Lines • Show All 351 Lines • Show Last 20 Lines |