Mercurial > hg > bitcoin
diff src/bitcoinrpc.cpp @ 1490:f5b3cf558f89 draft
Deprecate RPC getblocknumber
This RPC is exactly identical to getblockcount. This duplication
dates back to commit 22f721dbf23cf5ce9e3ded9bcfb65a3894cc0f8c when
Satoshi created the RPC interface.
There's no need to have both, so we standardize on "count" which
matches the naming convention in getconnectioncount.
Following the tradition established with previously deprecated APIs,
getblocknumber continues to work, but it's not listed in the help
system.
author | Michael Hendricks <michael@ndrix.org> |
---|---|
date | Thu, 10 Nov 2011 17:10:32 -0700 (2011-11-11) |
parents | 878c3aef8a40 |
children | a5acaf226b6b |
line wrap: on
line diff
--- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -126,6 +126,7 @@ // 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) @@ -178,12 +179,13 @@ } +// 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; } @@ -1858,7 +1860,7 @@ "help", "stop", "getblockcount", - "getblocknumber", + "getblocknumber", // deprecated "getconnectioncount", "getdifficulty", "getgenerate",