mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 15:48:05 +00:00
Check pindexBestForkBase for null
This commit is contained in:
parent
35ece7dd07
commit
730b1ed1a0
@ -1211,13 +1211,13 @@ void CheckForkWarningConditions()
|
|||||||
|
|
||||||
if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (chainActive.Tip()->GetBlockWork() * 6)))
|
if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (chainActive.Tip()->GetBlockWork() * 6)))
|
||||||
{
|
{
|
||||||
if (!fLargeWorkForkFound)
|
if (!fLargeWorkForkFound && pindexBestForkBase)
|
||||||
{
|
{
|
||||||
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("'");
|
||||||
CAlert::Notify(warning, true);
|
CAlert::Notify(warning, true);
|
||||||
}
|
}
|
||||||
if (pindexBestForkTip)
|
if (pindexBestForkTip && pindexBestForkBase)
|
||||||
{
|
{
|
||||||
LogPrintf("CheckForkWarningConditions: Warning: Large valid fork found\n forking the chain at height %d (%s)\n lasting to height %d (%s).\nChain state database corruption likely.\n",
|
LogPrintf("CheckForkWarningConditions: Warning: Large valid fork found\n forking the chain at height %d (%s)\n lasting to height %d (%s).\nChain state database corruption likely.\n",
|
||||||
pindexBestForkBase->nHeight, pindexBestForkBase->phashBlock->ToString(),
|
pindexBestForkBase->nHeight, pindexBestForkBase->phashBlock->ToString(),
|
||||||
|
Loading…
Reference in New Issue
Block a user