diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2018-02-13 00:24:14 -0500 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-02-15 22:38:12 +0100 |
commit | ad10b90e502d97993ba6e2b07e3f744129344a28 (patch) | |
tree | beac062fbc5b34d07a38a50f30117e32e9421f39 /src | |
parent | 4d54e7ad413b0113402a4d9546eb510d21ba2ecd (diff) | |
download | bitcoin-ad10b90e502d97993ba6e2b07e3f744129344a28.tar.xz |
fix possible shutdown assertion with -reindex-shutdown
Credit @eklitzke for reproducing.
Github-Pull: #12349
Rebased-From: ceaefdd5f362537a1908d0095059e4be788f3dee
Tree-SHA512: bdc614d3c3fba23147be9528c581e25bbf1f0c359b525b4a05472ab42484724a8b34c8b3ed151f3ff23e48235e972950f9daa155d9ca3c4a9de6d61bf0591b4b
Diffstat (limited to 'src')
-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 26c676a72f..1f0ceba70c 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -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 |