From d387b8ec15e553db9b9c370314ee359e981fb374 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 5 May 2014 13:22:28 +0200 Subject: 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) --- src/net.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/net.cpp') diff --git a/src/net.cpp b/src/net.cpp index 6369dd2924..6bde1e7999 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -44,18 +44,13 @@ static const int MAX_OUTBOUND_CONNECTIONS = 8; bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false); -struct LocalServiceInfo { - int nScore; - int nPort; -}; - // // Global state variables // bool fDiscover = true; uint64_t nLocalServices = NODE_NETWORK; -static CCriticalSection cs_mapLocalHost; -static map mapLocalHost; +CCriticalSection cs_mapLocalHost; +map mapLocalHost; static bool vfReachable[NET_MAX] = {}; static bool vfLimited[NET_MAX] = {}; static CNode* pnodeLocalHost = NULL; -- cgit v1.2.3