mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
fix: add 1 to tip.Height so output matches RPCs such as getblockcount
This commit is contained in:
parent
bf54a5dbb5
commit
749d371d23
@ -2301,7 +2301,7 @@ bool CChainState::ConnectBlock(const CBlock& block, BlockValidationState& state,
|
|||||||
|
|
||||||
::g_stats_client->timing("ConnectBlock_ms", (nTime8 - nTimeStart) / 1000, 1.0f);
|
::g_stats_client->timing("ConnectBlock_ms", (nTime8 - nTimeStart) / 1000, 1.0f);
|
||||||
::g_stats_client->gauge("blocks.tip.SizeBytes", ::GetSerializeSize(block, PROTOCOL_VERSION), 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.Height", m_chain.Height() + 1, 1.0f); // without the +1, the "tip.Height" doesn't match rpc calls like `getblockcount`
|
||||||
::g_stats_client->gauge("blocks.tip.Version", block.nVersion, 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.NumTransactions", block.vtx.size(), 1.0f);
|
||||||
::g_stats_client->gauge("blocks.tip.SigOps", nSigOps, 1.0f);
|
::g_stats_client->gauge("blocks.tip.SigOps", nSigOps, 1.0f);
|
||||||
|
Loading…
Reference in New Issue
Block a user