mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 06:52:36 +01:00
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
This commit is contained in:
commit
5eff1c748d
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue