aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-05-28 23:13:32 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-05-28 23:13:32 +0100
commit754f863a7edabd12741c1c25d341235bb5870645 (patch)
tree3bb96d405dba8398bcf6887bea6f99b797edf8bd /src/rpc/core_rpc_server.cpp
parentdaemon: remove obsolete daemon_commands_handler.h (diff)
downloadmonero-754f863a7edabd12741c1c25d341235bb5870645.tar.xz
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)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp3
1 files changed, 3 insertions, 0 deletions
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<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;