mirror of
https://github.com/monero-project/monero.git
synced 2024-12-24 12:39:59 +00:00
return message in stop_mining if mining never started
This commit is contained in:
parent
4cbb476cd1
commit
dad5bbfdf9
1 changed files with 8 additions and 1 deletions
|
@ -801,7 +801,14 @@ namespace cryptonote
|
||||||
bool core_rpc_server::on_stop_mining(const COMMAND_RPC_STOP_MINING::request& req, COMMAND_RPC_STOP_MINING::response& res)
|
bool core_rpc_server::on_stop_mining(const COMMAND_RPC_STOP_MINING::request& req, COMMAND_RPC_STOP_MINING::response& res)
|
||||||
{
|
{
|
||||||
PERF_TIMER(on_stop_mining);
|
PERF_TIMER(on_stop_mining);
|
||||||
if(!m_core.get_miner().stop())
|
cryptonote::miner &miner= m_core.get_miner();
|
||||||
|
if(!miner.is_mining())
|
||||||
|
{
|
||||||
|
res.status = "Mining never started";
|
||||||
|
LOG_PRINT_L0(res.status);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(!miner.stop())
|
||||||
{
|
{
|
||||||
res.status = "Failed, mining not stopped";
|
res.status = "Failed, mining not stopped";
|
||||||
LOG_PRINT_L0(res.status);
|
LOG_PRINT_L0(res.status);
|
||||||
|
|
Loading…
Reference in a new issue