diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-11-24 15:28:57 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-11-24 15:29:52 +0100 |
| commit | 1ee685f984bdeaac7468019c6e2cd4b7d3496aef (patch) | |
| tree | d45af927151ce00ee0fc4f93eefa33ebb474b2e0 /src/main.cpp | |
| parent | [Qt, OSX] fix Qt4.8 compatibility with QProgressBar issue (diff) | |
| parent | Check pindexBestForkBase for null (diff) | |
| download | discoin-1ee685f984bdeaac7468019c6e2cd4b7d3496aef.tar.xz discoin-1ee685f984bdeaac7468019c6e2cd4b7d3496aef.zip | |
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 02062c393..88cb9c5b2 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(), |