Add a getaddednodeinfo RPC.

This commit is contained in:
Matt Corallo
2013-01-23 11:48:17 -05:00
parent 72a348fd9a
commit 67a11bd6c5
3 changed files with 95 additions and 0 deletions

View File

@@ -202,6 +202,7 @@ static const CRPCCommand vRPCCommands[] =
{ "getconnectioncount", &getconnectioncount, true, false },
{ "getpeerinfo", &getpeerinfo, true, false },
{ "addnode", &addnode, true, true },
{ "getaddednodeinfo", &getaddednodeinfo, true, true },
{ "getdifficulty", &getdifficulty, true, false },
{ "getgenerate", &getgenerate, true, false },
{ "setgenerate", &setgenerate, true, false },
@@ -1180,6 +1181,7 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri
// Special case non-string parameter types
//
if (strMethod == "stop" && n > 0) ConvertTo<bool>(params[0]);
if (strMethod == "getaddednodeinfo" && n > 0) ConvertTo<bool>(params[0]);
if (strMethod == "setgenerate" && n > 0) ConvertTo<bool>(params[0]);
if (strMethod == "setgenerate" && n > 1) ConvertTo<boost::int64_t>(params[1]);
if (strMethod == "sendtoaddress" && n > 1) ConvertTo<double>(params[1]);