mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
fix: do not crash when running with statsenabled=1
(#5066)
This commit is contained in:
parent
55332c931a
commit
468769f9ff
@ -989,7 +989,7 @@ void PeriodicStats(ArgsManager& args)
|
||||
assert(args.GetBoolArg("-statsenabled", DEFAULT_STATSD_ENABLE));
|
||||
CCoinsStats stats;
|
||||
::ChainstateActive().ForceFlushStateToDisk();
|
||||
if (WITH_LOCK(cs_main, return GetUTXOStats(&::ChainstateActive().CoinsDB(), stats, CoinStatsHashType::NONE))) {
|
||||
if (WITH_LOCK(cs_main, return GetUTXOStats(&::ChainstateActive().CoinsDB(), stats, CoinStatsHashType::NONE, boost::this_thread::interruption_point))) {
|
||||
statsClient.gauge("utxoset.tx", stats.nTransactions, 1.0f);
|
||||
statsClient.gauge("utxoset.txOutputs", stats.nTransactionOutputs, 1.0f);
|
||||
statsClient.gauge("utxoset.dbSizeBytes", stats.nDiskSize, 1.0f);
|
||||
|
Loading…
Reference in New Issue
Block a user