diff options
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 8 | ||||
-rw-r--r-- | src/rpc/core_rpc_server.h | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 561161950..24c7d242f 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -291,6 +291,7 @@ namespace cryptonote if(!get_account_address_from_str(adr, m_testnet, req.miner_address)) { res.status = "Failed, wrong address"; + LOG_PRINT_L0(res.status); return true; } @@ -300,6 +301,7 @@ namespace cryptonote if(!m_core.get_miner().start(adr, static_cast<size_t>(req.threads_count), attrs)) { res.status = "Failed, mining not started"; + LOG_PRINT_L0(res.status); return true; } res.status = CORE_RPC_STATUS_OK; @@ -311,6 +313,7 @@ namespace cryptonote if(!m_core.get_miner().stop()) { res.status = "Failed, mining not stopped"; + LOG_PRINT_L0(res.status); return true; } res.status = CORE_RPC_STATUS_OK; @@ -349,10 +352,10 @@ namespace cryptonote //------------------------------------------------------------------------------------------------------------------------------ bool core_rpc_server::on_get_peer_list(const COMMAND_RPC_GET_PEER_LIST::request& req, COMMAND_RPC_GET_PEER_LIST::response& res) { - /* std::list<nodetool::peerlist_entry> white_list; std::list<nodetool::peerlist_entry> gray_list; - m_p2p.get_peerlist(white_list, gray_list); + m_p2p.get_peerlist_manager().get_peerlist_full(white_list, gray_list); + for (auto & entry : white_list) { @@ -364,7 +367,6 @@ namespace cryptonote res.gray_list.emplace_back(entry.id, entry.adr.ip, entry.adr.port, entry.last_seen); } - */ res.status = CORE_RPC_STATUS_OK; return true; } diff --git a/src/rpc/core_rpc_server.h b/src/rpc/core_rpc_server.h index cee8df25d..6152dea03 100644 --- a/src/rpc/core_rpc_server.h +++ b/src/rpc/core_rpc_server.h @@ -67,6 +67,7 @@ namespace cryptonote bool init( const boost::program_options::variables_map& vm ); + bool is_testnet() const { return m_testnet; } CHAIN_HTTP_TO_MAP2(connection_context); //forward http requests to uri map |