Pārlūkot izejas kodu

Add warning comment to getinfo

Warn that people should not add new information, or change current
information returned by getinfo.
tags/v0.15.1
Wladimir J. van der Laan pirms 7 gadiem
vecāks
revīzija
f9de17ec2f
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
1 mainītis faili ar 13 papildinājumiem un 0 dzēšanām
  1. 13
    0
      src/rpcmisc.cpp

+ 13
- 0
src/rpcmisc.cpp Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt