Removed all code related to fast_exit

This commit is contained in:
NanoAkron 2016-10-03 02:06:55 +01:00
parent 8f94fcf6a3
commit 6390673137
12 changed files with 2 additions and 104 deletions

View file

@ -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;

View file

@ -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);

View file

@ -170,11 +170,6 @@ t_command_server::t_command_server(
, std::bind(&t_command_parser_executor::set_limit_down, &m_parser, p::_1)
, "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)

View file

@ -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;

View file

@ -116,8 +116,6 @@ public:
bool set_limit_down(int limit);
bool fast_exit();
bool out_peers(uint64_t limit);
bool start_save_graph();