Browse Source

Merge #10864: Avoid redundant redeclaration of GetWarnings(const string&)

e0d459264 Avoid redundant redeclaration of GetWarnings(const string&) (practicalswift)

Pull request description:

  Avoid redundant redeclaration of `GetWarnings(const string&)`.

  `std::string GetWarnings(const std::string& strFor)` is declared in `warnings.h` and defined in `warnings.cpp`.

Tree-SHA512: d1503e00a2073cf080d66eafa303dc9c660a7ac15d4d2abcf2e4aa69cf9622d89a8e3f09324139bb7b8debaa6d1ee4a1c1681d347cebd99b1d3672a4da6d1ace
0.15
Jonas Schnelli 7 years ago
parent
commit
a6ec5802b0
No known key found for this signature in database
GPG Key ID: 1EB776BB03C7922D
  1. 1
      src/qt/clientmodel.cpp
  2. 1
      src/rpc/mining.cpp
  3. 1
      src/rpc/misc.cpp
  4. 2
      src/rpc/net.cpp
  5. 8
      src/validation.h
  6. 7
      src/warnings.h

1
src/qt/clientmodel.cpp

@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
#include "txmempool.h"
#include "ui_interface.h"
#include "util.h"
#include "warnings.h"
#include <stdint.h>

1
src/rpc/mining.cpp

@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
#include "util.h"
#include "utilstrencodings.h"
#include "validationinterface.h"
#include "warnings.h"
#include <memory>
#include <stdint.h>

1
src/rpc/misc.cpp

@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
#include "wallet/wallet.h"
#include "wallet/walletdb.h"
#endif
#include "warnings.h"
#include <stdint.h>
#ifdef HAVE_MALLOC_INFO

2
src/rpc/net.cpp

@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
#include "util.h"
#include "utilstrencodings.h"
#include "version.h"
#include "warnings.h"
#include <univalue.h>

8
src/validation.h

@ -268,14 +268,6 @@ void UnloadBlockIndex(); @@ -268,14 +268,6 @@ void UnloadBlockIndex();
void ThreadScriptCheck();
/** Check whether we are doing an initial block download (synchronizing from disk or network) */
bool IsInitialBlockDownload();
/** Format a string that describes several potential problems detected by the core.
* strFor can have three values:
* - "rpc": get critical warnings, which should put the client in safe mode if non-empty
* - "statusbar": get all warnings
* - "gui": get all warnings, translated (where possible) for GUI
* This function only returns the highest priority warning of the set selected by strFor.
*/
std::string GetWarnings(const std::string& strFor);
/** Retrieve a transaction (from memory pool, or from disk, if possible) */
bool GetTransaction(const uint256 &hash, CTransactionRef &tx, const Consensus::Params& params, uint256 &hashBlock, bool fAllowSlow = false);
/** Find the best known block, and make it the tip of the block chain */

7
src/warnings.h

@ -14,6 +14,13 @@ void SetfLargeWorkForkFound(bool flag); @@ -14,6 +14,13 @@ void SetfLargeWorkForkFound(bool flag);
bool GetfLargeWorkForkFound();
void SetfLargeWorkInvalidChainFound(bool flag);
bool GetfLargeWorkInvalidChainFound();
/** Format a string that describes several potential problems detected by the core.
* strFor can have three values:
* - "rpc": get critical warnings, which should put the client in safe mode if non-empty
* - "statusbar": get all warnings
* - "gui": get all warnings, translated (where possible) for GUI
* This function only returns the highest priority warning of the set selected by strFor.
*/
std::string GetWarnings(const std::string& strFor);
static const bool DEFAULT_TESTSAFEMODE = false;

Loading…
Cancel
Save