aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-11-21 11:31:42 -0800
committerGavin Andresen <gavinandresen@gmail.com>2011-11-21 11:31:42 -0800
commit0310cd6403e7e28cdbd0b436c55a8a4e0372f78e (patch)
tree44e7bdaad278e866df61364198ab022a3230f200
parent4ad4f66327ae21527035eb577d79a449296e37f8 (diff)
parent29c8b9416dc0a021ce4f27eadb88a0de98d7418e (diff)
Merge pull request #632 from mndrix/deprecate-getblocknumber
Deprecate RPC getblocknumber
-rw-r--r--src/bitcoinrpc.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index 31ef725d79..2857b7575e 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -126,6 +126,7 @@ Value help(const Array& params, bool fHelp)
// 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))
continue;
if (strCommand != "" && strMethod != strCommand)
@@ -181,12 +182,13 @@ 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"
- "Returns the block number of the latest block in the longest block chain.");
+ "Deprecated. Use getblockcount.");
return nBestHeight;
}
@@ -1870,7 +1872,7 @@ string pAllowInSafeMode[] =
"help",
"stop",
"getblockcount",
- "getblocknumber",
+ "getblocknumber", // deprecated
"getconnectioncount",
"getdifficulty",
"getgenerate",