Merge 9ad6f14175 into merged_master (Bitcoin PR #19220)

This commit is contained in:
Andrew Poelstra 2020-11-26 01:09:02 +00:00
commit 45fbde59c5

View file

@ -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) {