Add warning comment to getinfo

Warn that people should not add new information, or change current
information returned by getinfo.
This commit is contained in:
Wladimir J. van der Laan 2014-07-28 19:30:43 +02:00
parent 826d07101c
commit f9de17ec2f
No known key found for this signature in database
GPG key ID: 74810B012346C9A6

View file

@ -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)