@@ -1593,7 +1593,7 @@ bool fLargeWorkForkFound = false;
1593
1593
bool fLargeWorkInvalidChainFound = false ;
1594
1594
CBlockIndex *pindexBestForkTip = NULL , *pindexBestForkBase = NULL ;
1595
1595
1596
- static void AlertNotify (const std::string& strMessage, bool fThread )
1596
+ static void AlertNotify (const std::string& strMessage)
1597
1597
{
1598
1598
uiInterface.NotifyAlertChanged ();
1599
1599
std::string strCmd = GetArg (" -alertnotify" , " " );
@@ -1607,10 +1607,7 @@ static void AlertNotify(const std::string& strMessage, bool fThread)
1607
1607
safeStatus = singleQuote+safeStatus+singleQuote;
1608
1608
boost::replace_all (strCmd, " %s" , safeStatus);
1609
1609
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
1614
1611
}
1615
1612
1616
1613
void CheckForkWarningConditions ()
@@ -1632,7 +1629,7 @@ void CheckForkWarningConditions()
1632
1629
{
1633
1630
std::string warning = std::string (" 'Warning: Large-work fork detected, forking after block " ) +
1634
1631
pindexBestForkBase->phashBlock ->ToString () + std::string (" '" );
1635
- AlertNotify (warning, true );
1632
+ AlertNotify (warning);
1636
1633
}
1637
1634
if (pindexBestForkTip && pindexBestForkBase)
1638
1635
{
@@ -2163,7 +2160,7 @@ void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const
2163
2160
if (!strWarning.empty ())
2164
2161
{
2165
2162
strMiscWarning = strWarning;
2166
- AlertNotify (strWarning, true );
2163
+ AlertNotify (strWarning);
2167
2164
lastAlertTime = now;
2168
2165
}
2169
2166
}
@@ -2598,7 +2595,7 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) {
2598
2595
if (state == THRESHOLD_ACTIVE) {
2599
2596
strMiscWarning = strprintf (_ (" Warning: unknown new rules activated (versionbit %i)" ), bit);
2600
2597
if (!fWarned ) {
2601
- AlertNotify (strMiscWarning, true );
2598
+ AlertNotify (strMiscWarning);
2602
2599
fWarned = true ;
2603
2600
}
2604
2601
} else {
@@ -2620,7 +2617,7 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) {
2620
2617
// strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user:
2621
2618
strMiscWarning = _ (" Warning: Unknown block versions being mined! It's possible unknown rules are in effect" );
2622
2619
if (!fWarned ) {
2623
- AlertNotify (strMiscWarning, true );
2620
+ AlertNotify (strMiscWarning);
2624
2621
fWarned = true ;
2625
2622
}
2626
2623
}
0 commit comments