diff --git a/src/evo/deterministicmns.cpp b/src/evo/deterministicmns.cpp index b38e0d3f0b934..f48c59c977efb 100644 --- a/src/evo/deterministicmns.cpp +++ b/src/evo/deterministicmns.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include @@ -646,14 +646,14 @@ bool CDeterministicMNManager::ProcessBlock(const CBlock& block, gsl::not_nullgauge("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()) { diff --git a/src/init.cpp b/src/init.cpp index 2d044532efe49..28adfa735d603 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -881,7 +881,7 @@ static void PeriodicStats(NodeContext& node) ::g_stats_client->gauge("transactions.mempool.memoryUsageBytes", (int64_t) mempool.DynamicMemoryUsage(), 1.0f); ::g_stats_client->gauge("transactions.mempool.minFeePerKb", mempool.GetMinFee(args.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK(), 1.0f); } - ::g_stats_client.gauge("transactions.mempool.lockedTransactions", isman.GetInstantSendLockCount(), 1.0f); + ::g_stats_client->gauge("transactions.mempool.lockedTransactions", isman.GetInstantSendLockCount(), 1.0f); } static bool AppInitServers(NodeContext& node) diff --git a/src/llmq/chainlocks.cpp b/src/llmq/chainlocks.cpp index 33fb70953bc93..d0845751a6479 100644 --- a/src/llmq/chainlocks.cpp +++ b/src/llmq/chainlocks.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -500,7 +500,7 @@ void CChainLocksHandler::EnforceBestChainLock() GetMainSignals().NotifyChainLock(currentBestChainLockBlockIndex, clsig); uiInterface.NotifyChainLock(clsig->getBlockHash().ToString(), clsig->getHeight()); - statsClient.gauge("chainlocks.blockHeight", clsig->getHeight(), 1.0f); + ::g_stats_client->gauge("chainlocks.blockHeight", clsig->getHeight(), 1.0f); } MessageProcessingResult CChainLocksHandler::HandleNewRecoveredSig(const llmq::CRecoveredSig& recoveredSig) diff --git a/src/llmq/instantsend.cpp b/src/llmq/instantsend.cpp index 84248a98319e8..cab3e5818c443 100644 --- a/src/llmq/instantsend.cpp +++ b/src/llmq/instantsend.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include @@ -784,7 +784,7 @@ PeerMsgRet CInstantSendManager::ProcessMessageInstantSendLock(const CNode& pfrom // But if we received the islock and don't know when we got the tx, then say 0, to indicate we received the islock first. return 0; }(); - statsClient.timing("islock_ms", time_diff); + ::g_stats_client->timing("islock_ms", time_diff); LOCK(cs_pendingLocks); pendingInstantSendLocks.emplace(hash, std::make_pair(pfrom.GetId(), islock)); diff --git a/src/validation.cpp b/src/validation.cpp index cdba67dfaedf4..80bf055a998e7 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2690,12 +2690,12 @@ bool CChainState::DisconnectTip(BlockValidationState& state, DisconnectedBlockTr for (const auto& tx : block.vtx) { nSigOps += GetLegacySigOpCount(*tx); } - statsClient.timing("DisconnectTip_ms", (nTime2 - nTime1) / 1000, 1.0f); - statsClient.gauge("blocks.tip.SizeBytes", ::GetSerializeSize(block, PROTOCOL_VERSION), 1.0f); - statsClient.gauge("blocks.tip.Height", m_chain.Height(), 1.0f); - statsClient.gauge("blocks.tip.Version", block.nVersion, 1.0f); - statsClient.gauge("blocks.tip.NumTransactions", block.vtx.size(), 1.0f); - statsClient.gauge("blocks.tip.SigOps", nSigOps, 1.0f); + ::g_stats_client->timing("DisconnectTip_ms", (nTime2 - nTime1) / 1000, 1.0f); + ::g_stats_client->gauge("blocks.tip.SizeBytes", ::GetSerializeSize(block, PROTOCOL_VERSION), 1.0f); + ::g_stats_client->gauge("blocks.tip.Height", m_chain.Height(), 1.0f); + ::g_stats_client->gauge("blocks.tip.Version", block.nVersion, 1.0f); + ::g_stats_client->gauge("blocks.tip.NumTransactions", block.vtx.size(), 1.0f); + ::g_stats_client->gauge("blocks.tip.SigOps", nSigOps, 1.0f); return true; }