aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-05-09 13:33:51 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-05-09 13:34:00 +0200
commita68f56e727c3bd95fd9cd081da062dc1370175e0 (patch)
tree897a541a02dc9ca24d26187cfd7e73bdda5698af
parente29cfc48fc08ce7317a43d51b861de0fc0c24006 (diff)
parentb02119e4634f2453260bb1b195e39bdc0a3b5691 (diff)
downloadbitcoin-a68f56e727c3bd95fd9cd081da062dc1370175e0.tar.xz
Merge #7958: Remove useless argument to AlertNotify.
b02119e Remove useless argument to AlertNotify. (Pavel Janík)
-rw-r--r--src/main.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 090d1b2b1b..ebe91f7fa9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1593,7 +1593,7 @@ bool fLargeWorkForkFound = false;
bool fLargeWorkInvalidChainFound = false;
CBlockIndex *pindexBestForkTip = NULL, *pindexBestForkBase = NULL;
-static void AlertNotify(const std::string& strMessage, bool fThread)
+static void AlertNotify(const std::string& strMessage)
{
uiInterface.NotifyAlertChanged();
std::string strCmd = GetArg("-alertnotify", "");
@@ -1607,10 +1607,7 @@ static void AlertNotify(const std::string& strMessage, bool fThread)
safeStatus = singleQuote+safeStatus+singleQuote;
boost::replace_all(strCmd, "%s", safeStatus);
- if (fThread)
- boost::thread t(runCommand, strCmd); // thread runs free
- else
- runCommand(strCmd);
+ boost::thread t(runCommand, strCmd); // thread runs free
}
void CheckForkWarningConditions()
@@ -1632,7 +1629,7 @@ void CheckForkWarningConditions()
{
std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") +
pindexBestForkBase->phashBlock->ToString() + std::string("'");
- AlertNotify(warning, true);
+ AlertNotify(warning);
}
if (pindexBestForkTip && pindexBestForkBase)
{
@@ -2163,7 +2160,7 @@ void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const
if (!strWarning.empty())
{
strMiscWarning = strWarning;
- AlertNotify(strWarning, true);
+ AlertNotify(strWarning);
lastAlertTime = now;
}
}
@@ -2598,7 +2595,7 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) {
if (state == THRESHOLD_ACTIVE) {
strMiscWarning = strprintf(_("Warning: unknown new rules activated (versionbit %i)"), bit);
if (!fWarned) {
- AlertNotify(strMiscWarning, true);
+ AlertNotify(strMiscWarning);
fWarned = true;
}
} else {
@@ -2620,7 +2617,7 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) {
// strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user:
strMiscWarning = _("Warning: Unknown block versions being mined! It's possible unknown rules are in effect");
if (!fWarned) {
- AlertNotify(strMiscWarning, true);
+ AlertNotify(strMiscWarning);
fWarned = true;
}
}