diff --git a/src/index/coinstatsindex.cpp b/src/index/coinstatsindex.cpp index 7d4860b20bf..a1c8a5937cd 100644 --- a/src/index/coinstatsindex.cpp +++ b/src/index/coinstatsindex.cpp @@ -363,6 +363,14 @@ bool CoinStatsIndex::Init() 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; m_bogo_size = entry.bogo_size; m_total_amount = entry.total_amount;