diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-11-24 15:28:57 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-11-24 15:29:52 +0100 |
commit | 1ee685f984bdeaac7468019c6e2cd4b7d3496aef (patch) | |
tree | d45af927151ce00ee0fc4f93eefa33ebb474b2e0 /src/main.cpp | |
parent | c5a22828559bdac8fd347e30a3027dbaf54934ae (diff) | |
parent | 730b1ed1a0d2b2b0f278ee808e7e266a50fac94b (diff) |
Merge pull request #5154
730b1ed Check pindexBestForkBase for null (21E14)
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 02062c3935..88cb9c5b26 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1228,13 +1228,13 @@ void CheckForkWarningConditions() if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (GetBlockProof(*chainActive.Tip()) * 6))) { - if (!fLargeWorkForkFound) + if (!fLargeWorkForkFound && pindexBestForkBase) { 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(), |