mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
refactor: Pass hash_type to CoinsStats in stats object
This commit is contained in:
parent
2e2648a902
commit
9c8a265fd2
5 changed files with 17 additions and 14 deletions
|
|
@ -5285,14 +5285,14 @@ bool ChainstateManager::PopulateAndValidateSnapshot(
|
|||
return false;
|
||||
}
|
||||
|
||||
CCoinsStats stats;
|
||||
CCoinsStats stats{CoinStatsHashType::HASH_SERIALIZED};
|
||||
auto breakpoint_fnc = [] { /* TODO insert breakpoint here? */ };
|
||||
|
||||
// As above, okay to immediately release cs_main here since no other context knows
|
||||
// about the snapshot_chainstate.
|
||||
CCoinsViewDB* snapshot_coinsdb = WITH_LOCK(::cs_main, return &snapshot_chainstate.CoinsDB());
|
||||
|
||||
if (!GetUTXOStats(snapshot_coinsdb, WITH_LOCK(::cs_main, return std::ref(m_blockman)), stats, CoinStatsHashType::HASH_SERIALIZED, breakpoint_fnc)) {
|
||||
if (!GetUTXOStats(snapshot_coinsdb, WITH_LOCK(::cs_main, return std::ref(m_blockman)), stats, breakpoint_fnc)) {
|
||||
LogPrintf("[snapshot] failed to generate coins stats\n");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue