mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
rpc: add getblockchaininfo and getnetworkinfo
Adds two new info query commands that take over information from hodge-podge `getinfo`. Also some new information is added: - `getblockchaininfo` - `chain`: (string) current chain (main, testnet3, regtest) - `verificationprogress: (numeric) estimated verification progress - `chainwork` - `getnetworkinfo` - `localaddresses`: (array) local addresses, from mapLocalHost (fixes #1734)
This commit is contained in:
@@ -228,6 +228,7 @@ static const CRPCCommand vRPCCommands[] =
|
||||
{ "stop", &stop, true, true, false },
|
||||
|
||||
/* P2P networking */
|
||||
{ "getnetworkinfo", &getnetworkinfo, true, false, false },
|
||||
{ "addnode", &addnode, true, true, false },
|
||||
{ "getaddednodeinfo", &getaddednodeinfo, true, true, false },
|
||||
{ "getconnectioncount", &getconnectioncount, true, false, false },
|
||||
@@ -236,6 +237,7 @@ static const CRPCCommand vRPCCommands[] =
|
||||
{ "ping", &ping, true, false, false },
|
||||
|
||||
/* Block chain and UTXO */
|
||||
{ "getblockchaininfo", &getblockchaininfo, true, false, false },
|
||||
{ "getbestblockhash", &getbestblockhash, true, false, false },
|
||||
{ "getblockcount", &getblockcount, true, false, false },
|
||||
{ "getblock", &getblock, false, false, false },
|
||||
|
||||
Reference in New Issue
Block a user