aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-07-28 19:30:43 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-07-28 19:30:58 +0200
commitf9de17ec2f3e22fe9d96557e328af836a3590660 (patch)
tree0239a71638ba8a495aeb721a80e025684ab43c39
parent826d07101c569ab5ec5c0bfae9b0f5a8d72889b4 (diff)
Add warning comment to getinfo
Warn that people should not add new information, or change current information returned by getinfo.
-rw-r--r--src/rpcmisc.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index cff795bdf4..bd992397b8 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -27,6 +27,19 @@ using namespace boost::assign;
using namespace json_spirit;
using namespace std;
+/**
+ * @note Do not add or change anything in the information returned by this
+ * method. `getinfo` exists for backwards-compatibilty only. It combines
+ * information from wildly different sources in the program, which is a mess,
+ * and is thus planned to be deprecated eventually.
+ *
+ * Based on the source of the information, new information should be added to:
+ * - `getblockchaininfo`,
+ * - `getnetworkinfo` or
+ * - `getwalletinfo`
+ *
+ * Or alternatively, create a specific query method for the information.
+ **/
Value getinfo(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)