Auto merge of #1009 - ThisIsNotOfficialCodeItsJustForks:t171-hard-fork-alerts-and-tests, r=ebfull

Enable -alertnotify for hard fork detection. Test it.

Closes #171. Closes #131.
This commit is contained in:
zkbot
2016-06-12 18:04:53 +00:00
3 changed files with 72 additions and 1 deletions

View File

@@ -1454,7 +1454,9 @@ void CheckForkWarningConditions()
}
else
{
LogPrintf("%s: Warning: Found invalid chain at least ~6 blocks longer than our best chain.\nChain state database corruption likely.\n", __func__);
std::string warning = std::string("Warning: Found invalid chain at least ~6 blocks longer than our best chain.\nChain state database corruption likely.");
LogPrintf("%s: %s\n", warning.c_str(), __func__);
CAlert::Notify(warning, true);
fLargeWorkInvalidChainFound = true;
}
}