Skip to content

Commit f9de17e

Browse files
committed
Add warning comment to getinfo
Warn that people should not add new information, or change current information returned by getinfo.
1 parent 826d071 commit f9de17e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/rpcmisc.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ using namespace boost::assign;
2727
using namespace json_spirit;
2828
using namespace std;
2929

30+
/**
31+
* @note Do not add or change anything in the information returned by this
32+
* method. `getinfo` exists for backwards-compatibilty only. It combines
33+
* information from wildly different sources in the program, which is a mess,
34+
* and is thus planned to be deprecated eventually.
35+
*
36+
* Based on the source of the information, new information should be added to:
37+
* - `getblockchaininfo`,
38+
* - `getnetworkinfo` or
39+
* - `getwalletinfo`
40+
*
41+
* Or alternatively, create a specific query method for the information.
42+
**/
3043
Value getinfo(const Array& params, bool fHelp)
3144
{
3245
if (fHelp || params.size() != 0)

0 commit comments

Comments
 (0)