Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show First 20 Lines • Show All 1,229 Lines • ▼ Show 20 Lines | UniValue getblockchaininfo(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
if (request.fHelp || request.params.size() != 0) { | if (request.fHelp || request.params.size() != 0) { | ||||
throw std::runtime_error( | throw std::runtime_error( | ||||
"getblockchaininfo\n" | "getblockchaininfo\n" | ||||
"Returns an object containing various state info regarding " | "Returns an object containing various state info regarding " | ||||
"blockchain processing.\n" | "blockchain processing.\n" | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"{\n" | "{\n" | ||||
" \"chain\": \"xxxx\", (string) current network name as " | " \"chain\": \"xxxx\", (string) current network name " | ||||
"defined in BIP70 (main, test, regtest)\n" | "as defined in BIP70 (main, test, regtest)\n" | ||||
" \"blocks\": xxxxxx, (numeric) the current number of " | " \"blocks\": xxxxxx, (numeric) the current number of " | ||||
"blocks processed in the server\n" | "blocks processed in the server\n" | ||||
" \"headers\": xxxxxx, (numeric) the current number of " | " \"headers\": xxxxxx, (numeric) the current number of " | ||||
"headers we have validated\n" | "headers we have validated\n" | ||||
" \"bestblockhash\": \"...\", (string) the hash of the currently " | " \"bestblockhash\": \"...\", (string) the hash of the " | ||||
"best block\n" | "currently best block\n" | ||||
" \"difficulty\": xxxxxx, (numeric) the current difficulty\n" | " \"difficulty\": xxxxxx, (numeric) the current " | ||||
"difficulty\n" | |||||
" \"mediantime\": xxxxxx, (numeric) median time for the " | " \"mediantime\": xxxxxx, (numeric) median time for the " | ||||
"current best block\n" | "current best block\n" | ||||
" \"verificationprogress\": xxxx, (numeric) estimate of " | " \"verificationprogress\": xxxx, (numeric) estimate of " | ||||
"verification progress [0..1]\n" | "verification progress [0..1]\n" | ||||
" \"chainwork\": \"xxxx\" (string) total amount of work in " | " \"chainwork\": \"xxxx\" (string) total amount of work " | ||||
"active chain, in hexadecimal\n" | "in active chain, in hexadecimal\n" | ||||
" \"pruned\": xx, (boolean) if the blocks are subject " | " \"pruned\": xx, (boolean) if the blocks are " | ||||
"to pruning\n" | "subject to pruning\n" | ||||
" \"pruneheight\": xxxxxx, (numeric) lowest-height complete " | " \"pruneheight\": xxxxxx, (numeric) lowest-height " | ||||
"block stored\n" | "complete block stored\n" | ||||
" \"softforks\": [ (array) status of softforks in " | " \"softforks\": [ (array) status of softforks in " | ||||
"progress\n" | "progress\n" | ||||
" {\n" | " {\n" | ||||
" \"id\": \"xxxx\", (string) name of softfork\n" | " \"id\": \"xxxx\", (string) name of softfork\n" | ||||
" \"version\": xx, (numeric) block version\n" | " \"version\": xx, (numeric) block version\n" | ||||
" \"reject\": { (object) progress toward " | " \"reject\": { (object) progress toward " | ||||
"rejecting pre-softfork blocks\n" | "rejecting pre-softfork blocks\n" | ||||
" \"status\": xx, (boolean) true if threshold " | " \"status\": xx, (boolean) true if threshold " | ||||
"reached\n" | "reached\n" | ||||
" },\n" | " },\n" | ||||
" }, ...\n" | " }, ...\n" | ||||
" ]\n" | " ]\n" | ||||
" \"warnings\" : \"...\", (string) any network and " | " \"warnings\" : \"...\", (string) any network and " | ||||
"blockchain warnings.\n" | "blockchain warnings.\n" | ||||
"}\n" | "}\n" | ||||
"\nExamples:\n" + | "\nExamples:\n" + | ||||
▲ Show 20 Lines • Show All 592 Lines • Show Last 20 Lines |