aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorPatrick Lodder <[email protected]>2021-08-04 22:10:44 +0200
committerGitHub <[email protected]>2021-08-04 22:10:44 +0200
commita88d53be2e46875ce95cffa31073081f40087214 (patch)
tree958e3542853d12a7b6c9d92ca2198abcfe926955 /src/validation.cpp
parentMerge pull request #2434 from patricklodder/1.14-activatebestchain-shutdown-fix (diff)
parentconsensus: Fix a rare crash bug (diff)
downloaddiscoin-a88d53be2e46875ce95cffa31073081f40087214.tar.xz
discoin-a88d53be2e46875ce95cffa31073081f40087214.zip
Merge pull request #2415 from rnicoll/1.14.4-rbf-fee
Reduce BIP125 replace by fee increment value
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 35778a2e7..c81ab3c20 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2573,7 +2573,11 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
}
} while (pindexNewTip != pindexMostWork);
- CheckBlockIndex(chainparams.GetConsensus(pindexNewTip->nHeight));
+ if (pindexNewTip != NULL) {
+ CheckBlockIndex(chainparams.GetConsensus(pindexNewTip->nHeight));
+ } else {
+ CheckBlockIndex(chainparams.GetConsensus(0));
+ }
// Write changes periodically to disk, after relay.
if (!FlushStateToDisk(state, FLUSH_STATE_PERIODIC)) {