mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-06 14:19:59 -05:00
index: check muhash is in sync on coinstatsindex launch
This commit is contained in:
parent
38ed58b850
commit
820c03aff5
1 changed files with 8 additions and 0 deletions
|
@ -363,6 +363,14 @@ bool CoinStatsIndex::Init()
|
||||||
return error("%s: Cannot read current %s state; index may be corrupted",
|
return error("%s: Cannot read current %s state; index may be corrupted",
|
||||||
__func__, GetName());
|
__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_transaction_output_count = entry.transaction_output_count;
|
||||||
m_bogo_size = entry.bogo_size;
|
m_bogo_size = entry.bogo_size;
|
||||||
m_total_amount = entry.total_amount;
|
m_total_amount = entry.total_amount;
|
||||||
|
|
Loading…
Add table
Reference in a new issue