diff options
| author | Wladimir J. van der Laan <[email protected]> | 2018-02-15 22:21:50 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2018-02-15 22:21:57 +0100 |
| commit | 5eff1c748d56a2318d10bf6cd925b6084349e13e (patch) | |
| tree | 03c972e45e70961ab15afb521d50fe253a1b2cf0 /src/validation.cpp | |
| parent | Merge #12422: util: Make LockDirectory thread-safe, consistent, and fix OpenB... (diff) | |
| parent | fix possible shutdown assertion with -reindex-shutdown (diff) | |
| download | discoin-5eff1c748d56a2318d10bf6cd925b6084349e13e.tar.xz discoin-5eff1c748d56a2318d10bf6cd925b6084349e13e.zip | |
Merge #12349: shutdown: fix crash on shutdown with reindex-chainstate
ceaefdd fix possible shutdown assertion with -reindex-shutdown (Cory Fields)
Pull request description:
Fixes the assertion error reported here: https://github.com/bitcoin/bitcoin/pull/12349#issuecomment-365095741
Tree-SHA512: db8e2a275f92a99df7f17852d00eba6df996e412aa3ed3853a9ea0a8cb9800760677532efd52f92abbf2cdcc4210957a87a5f919ac998d46c205365a7a7dffca
Diffstat (limited to 'src/validation.cpp')
| -rw-r--r-- | src/validation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index d9e877f2e..e809f66e2 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2087,7 +2087,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 |