@@ -650,14 +650,16 @@ bool CDeterministicMNManager::ProcessBlock(const CBlock& block, gsl::not_null<co
650
650
updatesRet = {newList, oldList, diff};
651
651
}
652
652
653
- ::g_stats_client->gauge (" masternodes.count" , newList.GetAllMNsCount ());
654
- ::g_stats_client->gauge (" masternodes.weighted_count" , newList.GetValidWeightedMNsCount ());
655
- ::g_stats_client->gauge (" masternodes.enabled" , newList.GetValidMNsCount ());
656
- ::g_stats_client->gauge (" masternodes.weighted_enabled" , newList.GetValidWeightedMNsCount ());
657
- ::g_stats_client->gauge (" masternodes.evo.count" , newList.GetAllEvoCount ());
658
- ::g_stats_client->gauge (" masternodes.evo.enabled" , newList.GetValidEvoCount ());
659
- ::g_stats_client->gauge (" masternodes.mn.count" , newList.GetAllMNsCount () - newList.GetAllEvoCount ());
660
- ::g_stats_client->gauge (" masternodes.mn.enabled" , newList.GetValidMNsCount () - newList.GetValidEvoCount ());
653
+ if (::g_stats_client->active ()) {
654
+ ::g_stats_client->gauge (" masternodes.count" , newList.GetAllMNsCount ());
655
+ ::g_stats_client->gauge (" masternodes.weighted_count" , newList.GetValidWeightedMNsCount ());
656
+ ::g_stats_client->gauge (" masternodes.enabled" , newList.GetValidMNsCount ());
657
+ ::g_stats_client->gauge (" masternodes.weighted_enabled" , newList.GetValidWeightedMNsCount ());
658
+ ::g_stats_client->gauge (" masternodes.evo.count" , newList.GetAllEvoCount ());
659
+ ::g_stats_client->gauge (" masternodes.evo.enabled" , newList.GetValidEvoCount ());
660
+ ::g_stats_client->gauge (" masternodes.mn.count" , newList.GetAllMNsCount () - newList.GetAllEvoCount ());
661
+ ::g_stats_client->gauge (" masternodes.mn.enabled" , newList.GetValidMNsCount () - newList.GetValidEvoCount ());
662
+ }
661
663
662
664
if (nHeight == consensusParams.DIP0003EnforcementHeight ) {
663
665
if (!consensusParams.DIP0003EnforcementHash .IsNull () && consensusParams.DIP0003EnforcementHash != pindex->GetBlockHash ()) {
0 commit comments