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