diff options
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/daemon/command_parser_executor.cpp | 6 | ||||
-rw-r--r-- | src/daemon/command_parser_executor.h | 2 | ||||
-rw-r--r-- | src/daemon/command_server.cpp | 5 | ||||
-rw-r--r-- | src/daemon/executor.cpp | 2 | ||||
-rw-r--r-- | src/daemon/protocol.h | 5 | ||||
-rw-r--r-- | src/daemon/rpc_command_executor.cpp | 30 | ||||
-rw-r--r-- | src/daemon/rpc_command_executor.h | 2 |
8 files changed, 7 insertions, 49 deletions
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt index 8f9a50f13..0f4baf932 100644 --- a/src/daemon/CMakeLists.txt +++ b/src/daemon/CMakeLists.txt @@ -74,9 +74,9 @@ set(daemon_private_headers ../p2p/p2p_protocol_defs.h ../p2p/stdafx.h) -bitmonero_private_headers(daemon +monero_private_headers(daemon ${daemon_private_headers}) -bitmonero_add_executable(daemon +monero_add_executable(daemon ${daemon_sources} ${daemon_headers} ${daemon_private_headers} diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index 83892c661..6ea862b56 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -336,12 +336,6 @@ bool t_command_parser_executor::set_limit_down(const std::vector<std::string>& a return m_executor.set_limit_down(limit); } -bool t_command_parser_executor::fast_exit(const std::vector<std::string>& args) -{ - if (!args.empty()) return false; - return m_executor.fast_exit(); -} - bool t_command_parser_executor::out_peers(const std::vector<std::string>& args) { if (args.empty()) return false; diff --git a/src/daemon/command_parser_executor.h b/src/daemon/command_parser_executor.h index e59f51cdb..7819bd261 100644 --- a/src/daemon/command_parser_executor.h +++ b/src/daemon/command_parser_executor.h @@ -98,8 +98,6 @@ public: bool set_limit_down(const std::vector<std::string>& args); - bool fast_exit(const std::vector<std::string>& args); - bool out_peers(const std::vector<std::string>& args); bool start_save_graph(const std::vector<std::string>& args); diff --git a/src/daemon/command_server.cpp b/src/daemon/command_server.cpp index 2c3c54841..cb54d1966 100644 --- a/src/daemon/command_server.cpp +++ b/src/daemon/command_server.cpp @@ -171,11 +171,6 @@ t_command_server::t_command_server( , "limit <kB/s> - Set download limit" ); m_command_lookup.set_handler( - "fast_exit" - , std::bind(&t_command_parser_executor::fast_exit, &m_parser, p::_1) - , "Exit" - ); - m_command_lookup.set_handler( "out_peers" , std::bind(&t_command_parser_executor::out_peers, &m_parser, p::_1) , "Set max number of out peers" diff --git a/src/daemon/executor.cpp b/src/daemon/executor.cpp index 3db3cb68d..9583fd056 100644 --- a/src/daemon/executor.cpp +++ b/src/daemon/executor.cpp @@ -56,7 +56,7 @@ namespace daemonize boost::program_options::variables_map const & vm ) { - LOG_PRINT_L0("Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL); + LOG_PRINT_L0("Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ") Daemonised"); return t_daemon{vm}; } diff --git a/src/daemon/protocol.h b/src/daemon/protocol.h index 8e2add4a2..eb894fb81 100644 --- a/src/daemon/protocol.h +++ b/src/daemon/protocol.h @@ -69,12 +69,13 @@ public: ~t_protocol() { - LOG_PRINT_L0("Deinitializing cryptonote_protocol..."); + LOG_PRINT_L0("Stopping cryptonote protocol..."); try { m_protocol.deinit(); m_protocol.set_p2p_endpoint(nullptr); + LOG_PRINT_L0("Cryptonote protocol stopped successfully"); } catch (...) { - LOG_PRINT_L0("Failed to deinitialize protocol..."); + LOG_ERROR("Failed to stop cryptonote protocol!"); } } }; diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index 67e51398c..2289bf37d 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -57,7 +57,7 @@ namespace { tools::msg_writer() << boost::format("%-10s %-25s %-25s %s") % prefix % id_str % addr_str % elapsed; } - void print_block_header(cryptonote::block_header_responce const & header) + void print_block_header(cryptonote::block_header_response const & header) { tools::success_msg_writer() << "timestamp: " << boost::lexical_cast<std::string>(header.timestamp) << std::endl @@ -989,34 +989,6 @@ bool t_rpc_command_executor::set_limit_down(int limit) return true; } -bool t_rpc_command_executor::fast_exit() -{ - cryptonote::COMMAND_RPC_FAST_EXIT::request req; - cryptonote::COMMAND_RPC_FAST_EXIT::response res; - - std::string fail_message = "Daemon did not stop"; - - if (m_is_rpc) - { - if (!m_rpc_client->rpc_request(req, res, "/fast_exit", fail_message.c_str())) - { - return true; - } - } - - else - { - if (!m_rpc_server->on_fast_exit(req, res) || res.status != CORE_RPC_STATUS_OK) - { - tools::fail_msg_writer() << fail_message.c_str(); - return true; - } - } - - tools::success_msg_writer() << "Daemon stopped"; - return true; -} - bool t_rpc_command_executor::out_peers(uint64_t limit) { cryptonote::COMMAND_RPC_OUT_PEERS::request req; diff --git a/src/daemon/rpc_command_executor.h b/src/daemon/rpc_command_executor.h index afb2b5f36..5eed44353 100644 --- a/src/daemon/rpc_command_executor.h +++ b/src/daemon/rpc_command_executor.h @@ -116,8 +116,6 @@ public: bool set_limit_down(int limit); - bool fast_exit(); - bool out_peers(uint64_t limit); bool start_save_graph(); |