aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp
index a2e6b85d29..92a5b34a3f 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -108,6 +108,7 @@ bool fDebug = false;
bool fPrintToConsole = false;
bool fPrintToDebugLog = true;
+CCriticalSection cs_warnings;
string strMiscWarning;
bool fLargeWorkForkFound = false;
bool fLargeWorkInvalidChainFound = false;
@@ -813,6 +814,36 @@ std::string CopyrightHolders(const std::string& strPrefix)
return strCopyrightHolders;
}
+void SetMiscWarning(const std::string& strWarning)
+{
+ LOCK(cs_warnings);
+ strMiscWarning = strWarning;
+}
+
+void SetfLargeWorkForkFound(bool flag)
+{
+ LOCK(cs_warnings);
+ fLargeWorkForkFound = flag;
+}
+
+bool GetfLargeWorkForkFound()
+{
+ LOCK(cs_warnings);
+ return fLargeWorkForkFound;
+}
+
+void SetfLargeWorkInvalidChainFound(bool flag)
+{
+ LOCK(cs_warnings);
+ fLargeWorkInvalidChainFound = flag;
+}
+
+bool GetfLargeWorkInvalidChainFound()
+{
+ LOCK(cs_warnings);
+ return fLargeWorkInvalidChainFound;
+}
+
std::string GetWarnings(const std::string& strFor)
{
string strStatusBar;
@@ -820,6 +851,8 @@ std::string GetWarnings(const std::string& strFor)
string strGUI;
const string uiAlertSeperator = "<hr />";
+ LOCK(cs_warnings);
+
if (!CLIENT_VERSION_IS_RELEASE) {
strStatusBar = "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications";
strGUI = _("This is a pre-release test build - use at your own risk - do not use for mining or merchant applications");