Browse Source

Merge pull request #1350 from jgarzik/del-deprecated

JSON-RPC: remove 'getblocknumber' deprecated RPC
miguelfreitas
Jeff Garzik 13 years ago
parent
commit
d6615a54c6
  1. 18
      src/bitcoinrpc.cpp

18
src/bitcoinrpc.cpp

@ -371,10 +371,7 @@ string CRPCTable::help(string strCommand) const @@ -371,10 +371,7 @@ string CRPCTable::help(string strCommand) const
const CRPCCommand *pcmd = mi->second;
string strMethod = mi->first;
// We already filter duplicates, but these deprecated screw up the sort order
if (strMethod == "getamountreceived" ||
strMethod == "getallreceived" ||
strMethod == "getblocknumber" || // deprecated
(strMethod.find("label") != string::npos))
if (strMethod.find("label") != string::npos)
continue;
if (strCommand != "" && strMethod != strCommand)
continue;
@ -439,18 +436,6 @@ Value getblockcount(const Array& params, bool fHelp) @@ -439,18 +436,6 @@ Value getblockcount(const Array& params, bool fHelp)
}
// deprecated
Value getblocknumber(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getblocknumber\n"
"Deprecated. Use getblockcount.");
return nBestHeight;
}
Value getconnectioncount(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
@ -2257,7 +2242,6 @@ static const CRPCCommand vRPCCommands[] = @@ -2257,7 +2242,6 @@ static const CRPCCommand vRPCCommands[] =
{ "help", &help, true },
{ "stop", &stop, true },
{ "getblockcount", &getblockcount, true },
{ "getblocknumber", &getblocknumber, true },
{ "getconnectioncount", &getconnectioncount, true },
{ "getdifficulty", &getdifficulty, true },
{ "getgenerate", &getgenerate, true },

Loading…
Cancel
Save