aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorTim L <timo614@gmail.com>2017-11-03 08:24:36 -0400
committerTim L <timo614@gmail.com>2017-11-07 16:34:49 -0500
commitfa51408272d634cae948bd237344cc92c0eb09e5 (patch)
treed590db998b7de27c832a7d8caf5664750642efd9 /src/rpc
parentMerge pull request #2764 (diff)
downloadmonero-fa51408272d634cae948bd237344cc92c0eb09e5.tar.xz
RPC: get_info add rpc_connections_count
Diffstat (limited to 'src/rpc')
-rwxr-xr-xsrc/rpc/core_rpc_server.cpp2
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index b3ce30d0c..de77c7de4 100755
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -150,6 +150,7 @@ namespace cryptonote
uint64_t total_conn = m_p2p.get_connections_count();
res.outgoing_connections_count = m_p2p.get_outgoing_connections_count();
res.incoming_connections_count = total_conn - res.outgoing_connections_count;
+ res.rpc_connections_count = get_connections_count();
res.white_peerlist_size = m_p2p.get_peerlist_manager().get_white_peers_count();
res.grey_peerlist_size = m_p2p.get_peerlist_manager().get_gray_peers_count();
res.testnet = m_testnet;
@@ -1328,6 +1329,7 @@ namespace cryptonote
uint64_t total_conn = m_p2p.get_connections_count();
res.outgoing_connections_count = m_p2p.get_outgoing_connections_count();
res.incoming_connections_count = total_conn - res.outgoing_connections_count;
+ res.rpc_connections_count = get_connections_count();
res.white_peerlist_size = m_p2p.get_peerlist_manager().get_white_peers_count();
res.grey_peerlist_size = m_p2p.get_peerlist_manager().get_gray_peers_count();
res.testnet = m_testnet;
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index ee2a79eb4..ec0ab4361 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -49,7 +49,7 @@ namespace cryptonote
// advance which version they will stop working with
// Don't go over 32767 for any of these
#define CORE_RPC_VERSION_MAJOR 1
-#define CORE_RPC_VERSION_MINOR 15
+#define CORE_RPC_VERSION_MINOR 16
#define MAKE_CORE_RPC_VERSION(major,minor) (((major)<<16)|(minor))
#define CORE_RPC_VERSION MAKE_CORE_RPC_VERSION(CORE_RPC_VERSION_MAJOR, CORE_RPC_VERSION_MINOR)
@@ -917,6 +917,7 @@ namespace cryptonote
uint64_t alt_blocks_count;
uint64_t outgoing_connections_count;
uint64_t incoming_connections_count;
+ uint64_t rpc_connections_count;
uint64_t white_peerlist_size;
uint64_t grey_peerlist_size;
bool testnet;
@@ -936,6 +937,7 @@ namespace cryptonote
KV_SERIALIZE(alt_blocks_count)
KV_SERIALIZE(outgoing_connections_count)
KV_SERIALIZE(incoming_connections_count)
+ KV_SERIALIZE(rpc_connections_count)
KV_SERIALIZE(white_peerlist_size)
KV_SERIALIZE(grey_peerlist_size)
KV_SERIALIZE(testnet)