Skip to content

Commit a6ec580

Browse files
committed
Merge #10864: Avoid redundant redeclaration of GetWarnings(const string&)
e0d4592 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
2 parents 9e8d6a3 + e0d4592 commit a6ec580

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

src/qt/clientmodel.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "txmempool.h"
1919
#include "ui_interface.h"
2020
#include "util.h"
21+
#include "warnings.h"
2122

2223
#include <stdint.h>
2324

src/rpc/mining.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "util.h"
2525
#include "utilstrencodings.h"
2626
#include "validationinterface.h"
27+
#include "warnings.h"
2728

2829
#include <memory>
2930
#include <stdint.h>

src/rpc/misc.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "wallet/wallet.h"
2222
#include "wallet/walletdb.h"
2323
#endif
24+
#include "warnings.h"
2425

2526
#include <stdint.h>
2627
#ifdef HAVE_MALLOC_INFO

src/rpc/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "util.h"
1919
#include "utilstrencodings.h"
2020
#include "version.h"
21-
21+
#include "warnings.h"
2222

2323
#include <univalue.h>
2424

src/validation.h

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

src/warnings.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ void SetfLargeWorkForkFound(bool flag);
1414
bool GetfLargeWorkForkFound();
1515
void SetfLargeWorkInvalidChainFound(bool flag);
1616
bool GetfLargeWorkInvalidChainFound();
17+
/** Format a string that describes several potential problems detected by the core.
18+
* strFor can have three values:
19+
* - "rpc": get critical warnings, which should put the client in safe mode if non-empty
20+
* - "statusbar": get all warnings
21+
* - "gui": get all warnings, translated (where possible) for GUI
22+
* This function only returns the highest priority warning of the set selected by strFor.
23+
*/
1724
std::string GetWarnings(const std::string& strFor);
1825

1926
static const bool DEFAULT_TESTSAFEMODE = false;

0 commit comments

Comments
 (0)