From bac366e1736aa60ea815c8b5d19251118495dc52 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 28 May 2015 14:07:31 +0100 Subject: core_rpc_server: reenable print_pl --- src/rpc/core_rpc_server.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/rpc/core_rpc_server.cpp') diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 561161950..898b6a4b0 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -349,10 +349,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 white_list; std::list 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 +364,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; } -- cgit v1.2.3 From 754f863a7edabd12741c1c25d341235bb5870645 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 28 May 2015 23:13:32 +0100 Subject: core_rpc_server: log some error messages to the console It's helpful when you don't know something failed (especially as everything ends up returning true, so caller thinks all's fine) --- src/rpc/core_rpc_server.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/rpc/core_rpc_server.cpp') diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 898b6a4b0..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(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; -- cgit v1.2.3