diff options
Diffstat (limited to 'src/index/coinstatsindex.cpp')
-rw-r--r-- | src/index/coinstatsindex.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/index/coinstatsindex.cpp b/src/index/coinstatsindex.cpp index ef247dc119..a1c8a5937c 100644 --- a/src/index/coinstatsindex.cpp +++ b/src/index/coinstatsindex.cpp @@ -360,7 +360,15 @@ bool CoinStatsIndex::Init() if (pindex) { DBVal entry; if (!LookUpOne(*m_db, pindex, entry)) { - return false; + return error("%s: Cannot read current %s state; index may be corrupted", + __func__, GetName()); + } + + uint256 out; + m_muhash.Finalize(out); + if (entry.muhash != out) { + return error("%s: Cannot read current %s state; index may be corrupted", + __func__, GetName()); } m_transaction_output_count = entry.transaction_output_count; |