Make QT runawayException call GetWarnings instead of directly access strMiscWarning.

This is a first step in avoiding racy accesses to strMiscWarning.

The change required moving GetWarnings and related globals to util.
This commit is contained in:
Gregory Maxwell
2016-11-29 01:00:11 +00:00
parent 2efcfa5acf
commit c63198f1c7
5 changed files with 59 additions and 49 deletions

View File

@@ -46,7 +46,12 @@ extern std::map<std::string, std::vector<std::string> > mapMultiArgs;
extern bool fDebug;
extern bool fPrintToConsole;
extern bool fPrintToDebugLog;
static const bool DEFAULT_TESTSAFEMODE = false;
extern std::string strMiscWarning;
extern bool fLargeWorkForkFound;
extern bool fLargeWorkInvalidChainFound;
extern bool fLogTimestamps;
extern bool fLogTimeMicros;
extern bool fLogIPs;
@@ -224,4 +229,6 @@ template <typename Callable> void TraceThread(const char* name, Callable func)
std::string CopyrightHolders(const std::string& strPrefix);
std::string GetWarnings(const std::string& strFor);
#endif // BITCOIN_UTIL_H