Skip to content

Commit

Permalink
fix possible shutdown assertion with -reindex-shutdown
Browse files Browse the repository at this point in the history
Credit @eklitzke for reproducing.

Github-Pull: #12349
Rebased-From: ceaefdd
Tree-SHA512: bdc614d3c3fba23147be9528c581e25bbf1f0c359b525b4a05472ab42484724a8b34c8b3ed151f3ff23e48235e972950f9daa155d9ca3c4a9de6d61bf0591b4b
  • Loading branch information
theuni authored and laanwj committed Feb 15, 2018
1 parent 4d54e7a commit ad10b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validation.cpp
Expand Up @@ -2086,7 +2086,7 @@ bool static FlushStateToDisk(const CChainParams& chainparams, CValidationState &
nLastWrite = nNow;
}
// Flush best chain related state. This can only be done if the blocks / block index write was also done.
if (fDoFullFlush) {
if (fDoFullFlush && !pcoinsTip->GetBestBlock().IsNull()) {
// Typical Coin structures on disk are around 48 bytes in size.
// Pushing a new one to the database can cause it to be written
// twice (once in the log, and once in the tables). This is already
Expand Down

0 comments on commit ad10b90

Please sign in to comment.