diff options
| author | Monzero Build System <builds@monzero.org> | 2026-08-15 21:14:26 +0100 |
|---|---|---|
| committer | Monzero Build System <builds@monzero.org> | 2026-08-15 21:14:26 +0100 |
| commit | 28f1919249465d3230f45ed21686c5a836d56df0 (patch) | |
| tree | 948fe5e7052c45c366c24a82b485ae9d1d38e39b /src/rpc | |
| parent | 4f92268d7c16741cfb41e5bbe2aa46cc260a9ea5 (diff) | |
| download | monzero-core-28f1919249465d3230f45ed21686c5a836d56df0.tar.gz monzero-core-28f1919249465d3230f45ed21686c5a836d56df0.tar.xz monzero-core-28f1919249465d3230f45ed21686c5a836d56df0.zip | |
Establish Monzero Phase 0 and inactive assets baselinemonzero-phase0-assets-prototype-20260815
Diffstat (limited to 'src/rpc')
| -rw-r--r-- | src/rpc/core_rpc_server.cpp | 8 | ||||
| -rw-r--r-- | src/rpc/daemon_handler.cpp | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index c68449630..b5bfb85fa 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -526,9 +526,11 @@ namespace cryptonote res.tx_count = m_core.get_blockchain_storage().get_total_transactions() - res.height; //without coinbase res.tx_pool_size = m_core.get_pool_transactions_count(!restricted); res.alt_blocks_count = restricted ? 0 : m_core.get_blockchain_storage().get_alternative_blocks_count(); - uint64_t total_conn = restricted ? 0 : m_p2p.get_public_connections_count(); - res.outgoing_connections_count = restricted ? 0 : m_p2p.get_public_outgoing_connections_count(); - res.incoming_connections_count = restricted ? 0 : (total_conn - res.outgoing_connections_count); + // Connection totals are safe, aggregate network-health information for + // Monzero's public dashboard. Individual peer addresses remain restricted. + uint64_t total_conn = m_p2p.get_public_connections_count(); + res.outgoing_connections_count = m_p2p.get_public_outgoing_connections_count(); + res.incoming_connections_count = total_conn - res.outgoing_connections_count; res.rpc_connections_count = restricted ? 0 : get_connections_count(); res.white_peerlist_size = restricted ? 0 : m_p2p.get_public_white_peers_count(); res.grey_peerlist_size = restricted ? 0 : m_p2p.get_public_gray_peers_count(); diff --git a/src/rpc/daemon_handler.cpp b/src/rpc/daemon_handler.cpp index add8bca8f..06b1af01f 100644 --- a/src/rpc/daemon_handler.cpp +++ b/src/rpc/daemon_handler.cpp @@ -562,9 +562,11 @@ namespace rpc res.info.alt_blocks_count = m_restricted ? 0 : chain.get_alternative_blocks_count(); - uint64_t total_conn = m_restricted ? 0 : m_p2p.get_public_connections_count(); - res.info.outgoing_connections_count = m_restricted ? 0 : m_p2p.get_public_outgoing_connections_count(); - res.info.incoming_connections_count = m_restricted ? 0 : total_conn - res.info.outgoing_connections_count; + // Publish aggregate counts while keeping peer identities unavailable from + // restricted RPC. + uint64_t total_conn = m_p2p.get_public_connections_count(); + res.info.outgoing_connections_count = m_p2p.get_public_outgoing_connections_count(); + res.info.incoming_connections_count = total_conn - res.info.outgoing_connections_count; res.info.white_peerlist_size = m_restricted ? 0 : m_p2p.get_public_white_peers_count(); |
