aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/txdb.cpp')
-rw-r--r--src/txdb.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp
index e39956e8eb..e4a4b3bf72 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -99,6 +99,9 @@ bool CCoinsViewDB::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock, boo
// We may be in the middle of replaying.
std::vector<uint256> old_heads = GetHeadBlocks();
if (old_heads.size() == 2) {
+ if (old_heads[0] != hashBlock) {
+ LogPrintLevel(BCLog::COINDB, BCLog::Level::Error, "The coins database detected an inconsistent state, likely due to a previous crash or shutdown. You will need to restart bitcoind with the -reindex-chainstate or -reindex configuration option.\n");
+ }
assert(old_heads[0] == hashBlock);
old_tip = old_heads[1];
}