|
|
@ -1593,7 +1593,7 @@ bool fLargeWorkForkFound = false; |
|
|
|
bool fLargeWorkInvalidChainFound = false; |
|
|
|
bool fLargeWorkInvalidChainFound = false; |
|
|
|
CBlockIndex *pindexBestForkTip = NULL, *pindexBestForkBase = NULL; |
|
|
|
CBlockIndex *pindexBestForkTip = NULL, *pindexBestForkBase = NULL; |
|
|
|
|
|
|
|
|
|
|
|
static void AlertNotify(const std::string& strMessage, bool fThread) |
|
|
|
static void AlertNotify(const std::string& strMessage) |
|
|
|
{ |
|
|
|
{ |
|
|
|
uiInterface.NotifyAlertChanged(); |
|
|
|
uiInterface.NotifyAlertChanged(); |
|
|
|
std::string strCmd = GetArg("-alertnotify", ""); |
|
|
|
std::string strCmd = GetArg("-alertnotify", ""); |
|
|
@ -1607,10 +1607,7 @@ static void AlertNotify(const std::string& strMessage, bool fThread) |
|
|
|
safeStatus = singleQuote+safeStatus+singleQuote; |
|
|
|
safeStatus = singleQuote+safeStatus+singleQuote; |
|
|
|
boost::replace_all(strCmd, "%s", safeStatus); |
|
|
|
boost::replace_all(strCmd, "%s", safeStatus); |
|
|
|
|
|
|
|
|
|
|
|
if (fThread) |
|
|
|
boost::thread t(runCommand, strCmd); // thread runs free
|
|
|
|
boost::thread t(runCommand, strCmd); // thread runs free
|
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
runCommand(strCmd); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CheckForkWarningConditions() |
|
|
|
void CheckForkWarningConditions() |
|
|
@ -1632,7 +1629,7 @@ void CheckForkWarningConditions() |
|
|
|
{ |
|
|
|
{ |
|
|
|
std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") + |
|
|
|
std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") + |
|
|
|
pindexBestForkBase->phashBlock->ToString() + std::string("'"); |
|
|
|
pindexBestForkBase->phashBlock->ToString() + std::string("'"); |
|
|
|
AlertNotify(warning, true); |
|
|
|
AlertNotify(warning); |
|
|
|
} |
|
|
|
} |
|
|
|
if (pindexBestForkTip && pindexBestForkBase) |
|
|
|
if (pindexBestForkTip && pindexBestForkBase) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -2163,7 +2160,7 @@ void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const |
|
|
|
if (!strWarning.empty()) |
|
|
|
if (!strWarning.empty()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
strMiscWarning = strWarning; |
|
|
|
strMiscWarning = strWarning; |
|
|
|
AlertNotify(strWarning, true); |
|
|
|
AlertNotify(strWarning); |
|
|
|
lastAlertTime = now; |
|
|
|
lastAlertTime = now; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -2598,7 +2595,7 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) { |
|
|
|
if (state == THRESHOLD_ACTIVE) { |
|
|
|
if (state == THRESHOLD_ACTIVE) { |
|
|
|
strMiscWarning = strprintf(_("Warning: unknown new rules activated (versionbit %i)"), bit); |
|
|
|
strMiscWarning = strprintf(_("Warning: unknown new rules activated (versionbit %i)"), bit); |
|
|
|
if (!fWarned) { |
|
|
|
if (!fWarned) { |
|
|
|
AlertNotify(strMiscWarning, true); |
|
|
|
AlertNotify(strMiscWarning); |
|
|
|
fWarned = true; |
|
|
|
fWarned = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} 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 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"); |
|
|
|
strMiscWarning = _("Warning: Unknown block versions being mined! It's possible unknown rules are in effect"); |
|
|
|
if (!fWarned) { |
|
|
|
if (!fWarned) { |
|
|
|
AlertNotify(strMiscWarning, true); |
|
|
|
AlertNotify(strMiscWarning); |
|
|
|
fWarned = true; |
|
|
|
fWarned = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|