RPC: add 'getpeerinfo', returning easy-to-retrieve per-CNode data

This commit is contained in:
Jeff Garzik
2012-06-29 17:24:53 -04:00
committed by Jeff Garzik
parent 70ab73a008
commit 1006f0707e
4 changed files with 84 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ static int64 nWalletUnlockTime;
static CCriticalSection cs_nWalletUnlockTime;
extern Value getconnectioncount(const Array& params, bool fHelp);
extern Value getpeerinfo(const Array& params, bool fHelp);
extern Value dumpprivkey(const Array& params, bool fHelp);
extern Value importprivkey(const Array& params, bool fHelp);
@@ -2300,6 +2301,7 @@ static const CRPCCommand vRPCCommands[] =
{ "stop", &stop, true },
{ "getblockcount", &getblockcount, true },
{ "getconnectioncount", &getconnectioncount, true },
{ "getpeerinfo", &getpeerinfo, true },
{ "getdifficulty", &getdifficulty, true },
{ "getgenerate", &getgenerate, true },
{ "setgenerate", &setgenerate, true },