aboutsummaryrefslogtreecommitdiff
path: root/src/warnings.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-06-09 09:35:10 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-06-09 09:35:10 +0300
commitbacbfb61eee6d3c32de3db4dea3f585c7159b643 (patch)
tree23af49ae07c02d1150a28256e93d0ba6708d6f90 /src/warnings.cpp
parenta79bca2f1fb25f433d6e100a31a3acfde2656ce1 (diff)
downloadbitcoin-bacbfb61eee6d3c32de3db4dea3f585c7159b643.tar.xz
refactor: Replace RecursiveMutex with Mutex in warnings.cpp
Diffstat (limited to 'src/warnings.cpp')
-rw-r--r--src/warnings.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/warnings.cpp b/src/warnings.cpp
index 467c3d0f65..e04e800687 100644
--- a/src/warnings.cpp
+++ b/src/warnings.cpp
@@ -9,32 +9,32 @@
#include <util/system.h>
#include <util/translation.h>
-static RecursiveMutex cs_warnings;
-static std::string strMiscWarning GUARDED_BY(cs_warnings);
-static bool fLargeWorkForkFound GUARDED_BY(cs_warnings) = false;
-static bool fLargeWorkInvalidChainFound GUARDED_BY(cs_warnings) = false;
+static Mutex g_warnings_mutex;
+static std::string strMiscWarning GUARDED_BY(g_warnings_mutex);
+static bool fLargeWorkForkFound GUARDED_BY(g_warnings_mutex) = false;
+static bool fLargeWorkInvalidChainFound GUARDED_BY(g_warnings_mutex) = false;
void SetMiscWarning(const std::string& strWarning)
{
- LOCK(cs_warnings);
+ LOCK(g_warnings_mutex);
strMiscWarning = strWarning;
}
void SetfLargeWorkForkFound(bool flag)
{
- LOCK(cs_warnings);
+ LOCK(g_warnings_mutex);
fLargeWorkForkFound = flag;
}
bool GetfLargeWorkForkFound()
{
- LOCK(cs_warnings);
+ LOCK(g_warnings_mutex);
return fLargeWorkForkFound;
}
void SetfLargeWorkInvalidChainFound(bool flag)
{
- LOCK(cs_warnings);
+ LOCK(g_warnings_mutex);
fLargeWorkInvalidChainFound = flag;
}
@@ -44,7 +44,7 @@ std::string GetWarnings(bool verbose)
std::string warnings_verbose;
const std::string warning_separator = "<hr />";
- LOCK(cs_warnings);
+ LOCK(g_warnings_mutex);
// Pre-release build warning
if (!CLIENT_VERSION_IS_RELEASE) {