aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-10-30 09:59:19 +0200
committerRiccardo Spagni <ric@spagni.net>2015-10-30 09:59:22 +0200
commit5978fc18f709d183be38ded63c0159768094c0a8 (patch)
tree9e2ec92c73d2d25d31eb20e6eef2b7b32090040b /src/rpc
parentMerge pull request #461 (diff)
parentrpc: fix start_mining and status RPC crashes (diff)
downloadmonero-5978fc18f709d183be38ded63c0159768094c0a8.tar.xz
Merge pull request #463
051ddbc rpc: fix start_mining and status RPC crashes (moneromooo-monero)
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/core_rpc_server.cpp1
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 6cfcec08c..f2a464c20 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -127,6 +127,7 @@ namespace cryptonote
res.incoming_connections_count = total_conn - res.outgoing_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;
res.status = CORE_RPC_STATUS_OK;
return true;
}
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index cb8845e8c..aa88ffcb4 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -280,6 +280,7 @@ namespace cryptonote
uint64_t incoming_connections_count;
uint64_t white_peerlist_size;
uint64_t grey_peerlist_size;
+ bool testnet;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(status)
@@ -293,6 +294,7 @@ namespace cryptonote
KV_SERIALIZE(incoming_connections_count)
KV_SERIALIZE(white_peerlist_size)
KV_SERIALIZE(grey_peerlist_size)
+ KV_SERIALIZE(testnet)
END_KV_SERIALIZE_MAP()
};
};