From 8ed0d72b12e6b0d1733c106d07c1b1036507e81e Mon Sep 17 00:00:00 2001 From: NanoAkron Date: Mon, 3 Oct 2016 22:11:00 +0100 Subject: Moved logging to target functions rather than caller --- src/cryptonote_core/miner.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/cryptonote_core/miner.cpp') diff --git a/src/cryptonote_core/miner.cpp b/src/cryptonote_core/miner.cpp index ec717a13d..7e4f705a2 100644 --- a/src/cryptonote_core/miner.cpp +++ b/src/cryptonote_core/miner.cpp @@ -278,7 +278,10 @@ namespace cryptonote //----------------------------------------------------------------------------------------------------- bool miner::stop() { + LOG_PRINT_L1("Miner has received stop signal"); + if (!is_mining()) + LOG_PRINT_L1("Not mining - nothing to stop" ); return true; send_stop_signal(); -- cgit v1.2.3 From fb1785ab94f1c0420f912185aeab371c1a716aa2 Mon Sep 17 00:00:00 2001 From: NanoAkron Date: Tue, 4 Oct 2016 01:10:12 +0100 Subject: Brackets to ensure doesn't function prematurely return --- src/cryptonote_core/miner.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/cryptonote_core/miner.cpp') diff --git a/src/cryptonote_core/miner.cpp b/src/cryptonote_core/miner.cpp index 7e4f705a2..6f4e706ed 100644 --- a/src/cryptonote_core/miner.cpp +++ b/src/cryptonote_core/miner.cpp @@ -281,8 +281,10 @@ namespace cryptonote LOG_PRINT_L1("Miner has received stop signal"); if (!is_mining()) + { LOG_PRINT_L1("Not mining - nothing to stop" ); return true; + } send_stop_signal(); CRITICAL_REGION_LOCAL(m_threads_lock); -- cgit v1.2.3