File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1612,6 +1612,8 @@ void CConnman::CalculateNumConnectionsChangedStats()
16121612 }
16131613
16141614 // count various node attributes for statsD
1615+ int fullNodes = 0 ;
1616+ int spvNodes = 0 ;
16151617 int inboundNodes = 0 ;
16161618 int outboundNodes = 0 ;
16171619 int ipv4Nodes = 0 ;
@@ -1637,6 +1639,11 @@ void CConnman::CalculateNumConnectionsChangedStats()
16371639 for (const mapMsgTypeSize::value_type &i : pnode->mapSendBytesPerMsgType )
16381640 mapSentBytesMsgStats[i.first ] += i.second ;
16391641 }
1642+ if (pnode->m_bloom_filter_loaded .load ()) {
1643+ spvNodes++;
1644+ } else {
1645+ fullNodes++;
1646+ }
16401647 if (pnode->IsInboundConn ())
16411648 inboundNodes++;
16421649 else
@@ -1656,6 +1663,8 @@ void CConnman::CalculateNumConnectionsChangedStats()
16561663 statsClient.gauge (" bandwidth.message." + msg + " .totalBytesSent" , mapSentBytesMsgStats[msg], 1 .0f );
16571664 }
16581665 statsClient.gauge (" peers.totalConnections" , nPrevNodeCount, 1 .0f );
1666+ statsClient.gauge (" peers.spvNodeConnections" , spvNodes, 1 .0f );
1667+ statsClient.gauge (" peers.fullNodeConnections" , fullNodes, 1 .0f );
16591668 statsClient.gauge (" peers.inboundConnections" , inboundNodes, 1 .0f );
16601669 statsClient.gauge (" peers.outboundConnections" , outboundNodes, 1 .0f );
16611670 statsClient.gauge (" peers.ipv4Connections" , ipv4Nodes, 1 .0f );
You can’t perform that action at this time.
0 commit comments