Skip to content

Commit b02119e

Browse files
committed
Remove useless argument to AlertNotify.
It is always 'true', so useless.
1 parent 46880ed commit b02119e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/main.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,7 @@ bool fLargeWorkForkFound = false;
15931593
bool fLargeWorkInvalidChainFound = false;
15941594
CBlockIndex *pindexBestForkTip = NULL, *pindexBestForkBase = NULL;
15951595

1596-
static void AlertNotify(const std::string& strMessage, bool fThread)
1596+
static void AlertNotify(const std::string& strMessage)
15971597
{
15981598
uiInterface.NotifyAlertChanged();
15991599
std::string strCmd = GetArg("-alertnotify", "");
@@ -1607,10 +1607,7 @@ static void AlertNotify(const std::string& strMessage, bool fThread)
16071607
safeStatus = singleQuote+safeStatus+singleQuote;
16081608
boost::replace_all(strCmd, "%s", safeStatus);
16091609

1610-
if (fThread)
1611-
boost::thread t(runCommand, strCmd); // thread runs free
1612-
else
1613-
runCommand(strCmd);
1610+
boost::thread t(runCommand, strCmd); // thread runs free
16141611
}
16151612

16161613
void CheckForkWarningConditions()
@@ -1632,7 +1629,7 @@ void CheckForkWarningConditions()
16321629
{
16331630
std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") +
16341631
pindexBestForkBase->phashBlock->ToString() + std::string("'");
1635-
AlertNotify(warning, true);
1632+
AlertNotify(warning);
16361633
}
16371634
if (pindexBestForkTip && pindexBestForkBase)
16381635
{
@@ -2163,7 +2160,7 @@ void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const
21632160
if (!strWarning.empty())
21642161
{
21652162
strMiscWarning = strWarning;
2166-
AlertNotify(strWarning, true);
2163+
AlertNotify(strWarning);
21672164
lastAlertTime = now;
21682165
}
21692166
}
@@ -2598,7 +2595,7 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) {
25982595
if (state == THRESHOLD_ACTIVE) {
25992596
strMiscWarning = strprintf(_("Warning: unknown new rules activated (versionbit %i)"), bit);
26002597
if (!fWarned) {
2601-
AlertNotify(strMiscWarning, true);
2598+
AlertNotify(strMiscWarning);
26022599
fWarned = true;
26032600
}
26042601
} else {
@@ -2620,7 +2617,7 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) {
26202617
// strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user:
26212618
strMiscWarning = _("Warning: Unknown block versions being mined! It's possible unknown rules are in effect");
26222619
if (!fWarned) {
2623-
AlertNotify(strMiscWarning, true);
2620+
AlertNotify(strMiscWarning);
26242621
fWarned = true;
26252622
}
26262623
}

0 commit comments

Comments
 (0)