Create new rpcnet module, and move 'getconnectioncount' RPC to it

This commit is contained in:
Jeff Garzik
2012-06-28 23:18:38 -04:00
committed by Jeff Garzik
parent 5fa83965f2
commit 70ab73a008
7 changed files with 27 additions and 11 deletions

View File

@@ -46,6 +46,7 @@ static std::string strRPCUserColonPass;
static int64 nWalletUnlockTime;
static CCriticalSection cs_nWalletUnlockTime;
extern Value getconnectioncount(const Array& params, bool fHelp);
extern Value dumpprivkey(const Array& params, bool fHelp);
extern Value importprivkey(const Array& params, bool fHelp);
@@ -456,17 +457,6 @@ Value getblockcount(const Array& params, bool fHelp)
}
Value getconnectioncount(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getconnectioncount\n"
"Returns the number of connections to other nodes.");
return (int)vNodes.size();
}
Value getdifficulty(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)