mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
feat: add transactions.mempool.lockedTransactions and chainlocks.blockHeight stats
This commit is contained in:
parent
7c00c868d8
commit
bf54a5dbb5
@ -833,6 +833,7 @@ static void PeriodicStats(NodeContext& node)
|
||||
const ArgsManager& args = *Assert(node.args);
|
||||
ChainstateManager& chainman = *Assert(node.chainman);
|
||||
const CTxMemPool& mempool = *Assert(node.mempool);
|
||||
const llmq::CInstantSendManager& isman = *Assert(node.llmq_ctx->isman);
|
||||
CCoinsStats stats{CoinStatsHashType::NONE};
|
||||
chainman.ActiveChainstate().ForceFlushStateToDisk();
|
||||
if (WITH_LOCK(cs_main, return GetUTXOStats(&chainman.ActiveChainstate().CoinsDB(), chainman.m_blockman, stats, node.rpc_interruption_point, chainman.ActiveChain().Tip()))) {
|
||||
@ -880,6 +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);
|
||||
}
|
||||
|
||||
static bool AppInitServers(NodeContext& node)
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <node/ui_interface.h>
|
||||
#include <scheduler.h>
|
||||
#include <spork.h>
|
||||
#include <statsd_client.h>
|
||||
#include <txmempool.h>
|
||||
#include <util/thread.h>
|
||||
#include <util/time.h>
|
||||
@ -499,6 +500,7 @@ void CChainLocksHandler::EnforceBestChainLock()
|
||||
|
||||
GetMainSignals().NotifyChainLock(currentBestChainLockBlockIndex, clsig);
|
||||
uiInterface.NotifyChainLock(clsig->getBlockHash().ToString(), clsig->getHeight());
|
||||
statsClient.gauge("chainlocks.blockHeight", clsig->getHeight(), 1.0f);
|
||||
}
|
||||
|
||||
MessageProcessingResult CChainLocksHandler::HandleNewRecoveredSig(const llmq::CRecoveredSig& recoveredSig)
|
||||
|
Loading…
Reference in New Issue
Block a user