From 3ee0cd8c51cb6c3cacebb1d0681cb4c2081ab4b0 Mon Sep 17 00:00:00 2001 From: cohcho <chat.freenode.net/cohcho> Date: Tue, 6 Oct 2020 13:34:19 +0000 Subject: [PATCH] Miner: fix state machine Remove unexpected resume due to disconnect during dataset init --- src/core/Miner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/Miner.cpp b/src/core/Miner.cpp index f4edfa975..d92e99152 100644 --- a/src/core/Miner.cpp +++ b/src/core/Miner.cpp @@ -134,8 +134,6 @@ public: Nonce::pause(true); } - active = true; - if (reset) { Nonce::reset(job.index()); } @@ -146,7 +144,7 @@ public: Nonce::touch(); - if (enabled) { + if (active && enabled) { Nonce::pause(false); } @@ -536,6 +534,8 @@ void xmrig::Miner::setJob(const Job &job, bool donate) mutex.unlock(); + d_ptr->active = true; + if (ready) { d_ptr->handleJobChange(); }