mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 11:32:46 +01:00
fixup: avoid expensive evaluations in stats code
This commit is contained in:
parent
3574550382
commit
7bbbc15db0
@ -646,14 +646,16 @@ bool CDeterministicMNManager::ProcessBlock(const CBlock& block, gsl::not_null<co
|
||||
updatesRet = {newList, oldList, diff};
|
||||
}
|
||||
|
||||
::g_stats_client->gauge("masternodes.count", newList.GetAllMNsCount());
|
||||
::g_stats_client->gauge("masternodes.weighted_count", newList.GetValidWeightedMNsCount());
|
||||
::g_stats_client->gauge("masternodes.enabled", newList.GetValidMNsCount());
|
||||
::g_stats_client->gauge("masternodes.weighted_enabled", newList.GetValidWeightedMNsCount());
|
||||
::g_stats_client->gauge("masternodes.evo.count", newList.GetAllEvoCount());
|
||||
::g_stats_client->gauge("masternodes.evo.enabled", newList.GetValidEvoCount());
|
||||
::g_stats_client->gauge("masternodes.mn.count", newList.GetAllMNsCount() - newList.GetAllEvoCount());
|
||||
::g_stats_client->gauge("masternodes.mn.enabled", newList.GetValidMNsCount() - newList.GetValidEvoCount());
|
||||
if (::g_stats_client->active()) {
|
||||
::g_stats_client->gauge("masternodes.count", newList.GetAllMNsCount());
|
||||
::g_stats_client->gauge("masternodes.weighted_count", newList.GetValidWeightedMNsCount());
|
||||
::g_stats_client->gauge("masternodes.enabled", newList.GetValidMNsCount());
|
||||
::g_stats_client->gauge("masternodes.weighted_enabled", newList.GetValidWeightedMNsCount());
|
||||
::g_stats_client->gauge("masternodes.evo.count", newList.GetAllEvoCount());
|
||||
::g_stats_client->gauge("masternodes.evo.enabled", newList.GetValidEvoCount());
|
||||
::g_stats_client->gauge("masternodes.mn.count", newList.GetAllMNsCount() - newList.GetAllEvoCount());
|
||||
::g_stats_client->gauge("masternodes.mn.enabled", newList.GetValidMNsCount() - newList.GetValidEvoCount());
|
||||
}
|
||||
|
||||
if (nHeight == consensusParams.DIP0003EnforcementHeight) {
|
||||
if (!consensusParams.DIP0003EnforcementHash.IsNull() && consensusParams.DIP0003EnforcementHash != pindex->GetBlockHash()) {
|
||||
|
Loading…
Reference in New Issue
Block a user