Check pindexBestForkBase/phashBlock both for null
This commit is contained in:
parent
3b140b22d7
commit
90ad641d39
@ -3,7 +3,7 @@ AC_PREREQ([2.60])
|
||||
define(_CLIENT_VERSION_MAJOR, 0)
|
||||
define(_CLIENT_VERSION_MINOR, 11)
|
||||
define(_CLIENT_VERSION_REVISION, 0)
|
||||
define(_CLIENT_VERSION_BUILD, 12)
|
||||
define(_CLIENT_VERSION_BUILD, 13)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
define(_COPYRIGHT_YEAR, 2015)
|
||||
AC_INIT([Darkcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@darkcoin.io],[darkcoin])
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define CLIENT_VERSION_MAJOR 0
|
||||
#define CLIENT_VERSION_MINOR 11
|
||||
#define CLIENT_VERSION_REVISION 0
|
||||
#define CLIENT_VERSION_BUILD 12
|
||||
#define CLIENT_VERSION_BUILD 13
|
||||
|
||||
|
||||
|
||||
|
16
src/main.cpp
16
src/main.cpp
@ -1743,20 +1743,22 @@ void CheckForkWarningConditions()
|
||||
|
||||
if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (chainActive.Tip()->GetBlockWork() * 6).getuint256()))
|
||||
{
|
||||
if (!fLargeWorkForkFound)
|
||||
if (!fLargeWorkForkFound && pindexBestForkBase)
|
||||
{
|
||||
if(pindexBestForkBase->phashBlock != NULL){
|
||||
if(pindexBestForkBase->phashBlock){
|
||||
std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") +
|
||||
pindexBestForkBase->phashBlock->ToString() + std::string("'");
|
||||
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",
|
||||
pindexBestForkBase->nHeight, pindexBestForkBase->phashBlock->ToString(),
|
||||
pindexBestForkTip->nHeight, pindexBestForkTip->phashBlock->ToString());
|
||||
fLargeWorkForkFound = true;
|
||||
if(pindexBestForkBase->phashBlock){
|
||||
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(),
|
||||
pindexBestForkTip->nHeight, pindexBestForkTip->phashBlock->ToString());
|
||||
fLargeWorkForkFound = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user