Provide correct warning in CheckForkWarningConditions for large worked invalid chain. (#1234)

This commit is contained in:
TheLazieR Yip 2017-01-01 17:18:05 +07:00 committed by UdjinM6
parent 275b95cb8e
commit 7815f6e32e

View File

@ -1857,7 +1857,10 @@ void CheckForkWarningConditions()
}
else
{
if(pindexBestInvalid->nHeight > chainActive.Height() + 6)
LogPrintf("%s: Warning: Found invalid chain at least ~6 blocks longer than our best chain.\nChain state database corruption likely.\n", __func__);
else
LogPrintf("%s: Warning: Found invalid chain which has higher work (at least ~6 blocks worth of work) than our best chain.\nChain state database corruption likely.\n", __func__);
fLargeWorkInvalidChainFound = true;
}
}