mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +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:
@@ -116,6 +116,13 @@ extern CCriticalSection cs_vAddedNodes;
|
||||
extern NodeId nLastNodeId;
|
||||
extern CCriticalSection cs_nLastNodeId;
|
||||
|
||||
struct LocalServiceInfo {
|
||||
int nScore;
|
||||
int nPort;
|
||||
};
|
||||
|
||||
extern CCriticalSection cs_mapLocalHost;
|
||||
extern map<CNetAddr, LocalServiceInfo> mapLocalHost;
|
||||
|
||||
class CNodeStats
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user