diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-08-07 09:14:17 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-08-07 09:14:53 +0200 |
| commit | e545371b77d419b3bf4dd194b3f3c107d9bce6d1 (patch) | |
| tree | 3e15636c9793f20ab745b71ec655827ce1bb1a97 /src/main.cpp | |
| parent | Merge pull request #6527 (diff) | |
| parent | Handle no chain tip available in InvalidChainFound() (diff) | |
| download | discoin-e545371b77d419b3bf4dd194b3f3c107d9bce6d1.tar.xz discoin-e545371b77d419b3bf4dd194b3f3c107d9bce6d1.zip | |
Merge pull request #6377
c433828 Handle no chain tip available in InvalidChainFound() (Ross Nicoll)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 79cc60685..755bec47b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1228,9 +1228,11 @@ void static InvalidChainFound(CBlockIndex* pindexNew) pindexNew->GetBlockHash().ToString(), pindexNew->nHeight, log(pindexNew->nChainWork.getdouble())/log(2.0), DateTimeStrFormat("%Y-%m-%d %H:%M:%S", pindexNew->GetBlockTime())); + CBlockIndex *tip = chainActive.Tip(); + assert (tip); LogPrintf("%s: current best=%s height=%d log2_work=%.8g date=%s\n", __func__, - chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble())/log(2.0), - DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime())); + tip->GetBlockHash().ToString(), chainActive.Height(), log(tip->nChainWork.getdouble())/log(2.0), + DateTimeStrFormat("%Y-%m-%d %H:%M:%S", tip->GetBlockTime())); CheckForkWarningConditions(); } |