From f9de17ec2f3e22fe9d96557e328af836a3590660 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 28 Jul 2014 19:30:43 +0200 Subject: Add warning comment to getinfo Warn that people should not add new information, or change current information returned by getinfo. --- src/rpcmisc.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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) -- cgit v1.2.3