18
18
#include < cuckoocache.h>
19
19
#include < flatfile.h>
20
20
#include < hash.h>
21
+ #include < kernel/coinstats.h>
21
22
#include < logging.h>
22
23
#include < logging/timer.h>
23
24
#include < node/blockstorage.h>
24
- #include < node/coinstats.h>
25
25
#include < node/ui_interface.h>
26
26
#include < node/utxo_snapshot.h>
27
27
#include < policy/policy.h>
60
60
61
61
using kernel::CCoinsStats;
62
62
using kernel::CoinStatsHashType;
63
+ using kernel::ComputeUTXOStats;
63
64
64
65
using node::BLOCKFILE_CHUNK_SIZE;
65
66
using node::BlockManager;
@@ -69,7 +70,6 @@ using node::CBlockIndexWorkComparator;
69
70
using node::fImporting ;
70
71
using node::fPruneMode ;
71
72
using node::fReindex ;
72
- using node::GetUTXOStats;
73
73
using node::nPruneTarget;
74
74
using node::OpenBlockFile;
75
75
using node::ReadBlockFromDisk;
@@ -4988,7 +4988,8 @@ bool ChainstateManager::PopulateAndValidateSnapshot(
4988
4988
CBlockIndex* snapshot_start_block = WITH_LOCK (::cs_main, return m_blockman.LookupBlockIndex (base_blockhash));
4989
4989
4990
4990
if (!snapshot_start_block) {
4991
- // Needed for GetUTXOStats and ExpectedAssumeutxo to determine the height and to avoid a crash when base_blockhash.IsNull()
4991
+ // Needed for ComputeUTXOStats and ExpectedAssumeutxo to determine the
4992
+ // height and to avoid a crash when base_blockhash.IsNull()
4992
4993
LogPrintf (" [snapshot] Did not find snapshot start blockheader %s\n " ,
4993
4994
base_blockhash.ToString ());
4994
4995
return false ;
@@ -5102,7 +5103,7 @@ bool ChainstateManager::PopulateAndValidateSnapshot(
5102
5103
// about the snapshot_chainstate.
5103
5104
CCoinsViewDB* snapshot_coinsdb = WITH_LOCK (::cs_main, return &snapshot_chainstate.CoinsDB ());
5104
5105
5105
- const std::optional<CCoinsStats> maybe_stats = GetUTXOStats (snapshot_coinsdb, m_blockman, CoinStatsHashType::HASH_SERIALIZED, breakpoint_fnc);
5106
+ const std::optional<CCoinsStats> maybe_stats = ComputeUTXOStats ( CoinStatsHashType::HASH_SERIALIZED, snapshot_coinsdb, m_blockman , breakpoint_fnc);
5106
5107
if (!maybe_stats.has_value ()) {
5107
5108
LogPrintf (" [snapshot] failed to generate coins stats\n " );
5108
5109
return false ;
0 commit comments