JSON-RPC: remove 'getblocknumber' deprecated RPC
RPC 'getblockcount' should be used instead.
This commit is contained in:
parent
6d64a0bfed
commit
47f48a658d
1 changed files with 1 additions and 17 deletions
|
@ -371,10 +371,7 @@ string CRPCTable::help(string strCommand) const
|
||||||
const CRPCCommand *pcmd = mi->second;
|
const CRPCCommand *pcmd = mi->second;
|
||||||
string strMethod = mi->first;
|
string strMethod = mi->first;
|
||||||
// We already filter duplicates, but these deprecated screw up the sort order
|
// We already filter duplicates, but these deprecated screw up the sort order
|
||||||
if (strMethod == "getamountreceived" ||
|
if (strMethod.find("label") != string::npos)
|
||||||
strMethod == "getallreceived" ||
|
|
||||||
strMethod == "getblocknumber" || // deprecated
|
|
||||||
(strMethod.find("label") != string::npos))
|
|
||||||
continue;
|
continue;
|
||||||
if (strCommand != "" && strMethod != strCommand)
|
if (strCommand != "" && strMethod != strCommand)
|
||||||
continue;
|
continue;
|
||||||
|
@ -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)
|
Value getconnectioncount(const Array& params, bool fHelp)
|
||||||
{
|
{
|
||||||
if (fHelp || params.size() != 0)
|
if (fHelp || params.size() != 0)
|
||||||
|
@ -2257,7 +2242,6 @@ static const CRPCCommand vRPCCommands[] =
|
||||||
{ "help", &help, true },
|
{ "help", &help, true },
|
||||||
{ "stop", &stop, true },
|
{ "stop", &stop, true },
|
||||||
{ "getblockcount", &getblockcount, true },
|
{ "getblockcount", &getblockcount, true },
|
||||||
{ "getblocknumber", &getblocknumber, true },
|
|
||||||
{ "getconnectioncount", &getconnectioncount, true },
|
{ "getconnectioncount", &getconnectioncount, true },
|
||||||
{ "getdifficulty", &getdifficulty, true },
|
{ "getdifficulty", &getdifficulty, true },
|
||||||
{ "getgenerate", &getgenerate, true },
|
{ "getgenerate", &getgenerate, true },
|
||||||
|
|
Loading…
Reference in a new issue