diff --git a/src/backend/cpu/CpuWorker.cpp b/src/backend/cpu/CpuWorker.cpp index d0047e4b7..bef2e898e 100644 --- a/src/backend/cpu/CpuWorker.cpp +++ b/src/backend/cpu/CpuWorker.cpp @@ -359,7 +359,9 @@ void xmrig::CpuWorker::start() } } - consumeJob(); + if (!Nonce::isPaused()) { + consumeJob(); + } } } diff --git a/src/backend/cuda/CudaWorker.cpp b/src/backend/cuda/CudaWorker.cpp index 97553637a..a3fd11ef4 100644 --- a/src/backend/cuda/CudaWorker.cpp +++ b/src/backend/cuda/CudaWorker.cpp @@ -158,7 +158,7 @@ void xmrig::CudaWorker::start() std::this_thread::yield(); } - if (!consumeJob()) { + if (isReady() && !consumeJob()) { return; } } diff --git a/src/backend/opencl/OclWorker.cpp b/src/backend/opencl/OclWorker.cpp index 45b92863f..dcac60b71 100644 --- a/src/backend/opencl/OclWorker.cpp +++ b/src/backend/opencl/OclWorker.cpp @@ -190,7 +190,7 @@ void xmrig::OclWorker::start() std::this_thread::yield(); } - if (!consumeJob()) { + if (isReady() && !consumeJob()) { return; } } diff --git a/src/core/Miner.cpp b/src/core/Miner.cpp index 9cc9092b3..e2b1d596e 100644 --- a/src/core/Miner.cpp +++ b/src/core/Miner.cpp @@ -576,6 +576,11 @@ void xmrig::Miner::setJob(const Job &job, bool donate) # ifdef XMRIG_ALGO_RANDOMX const bool ready = d_ptr->initRX(); + + // Always reset nonce on RandomX dataset change + if (!ready) { + d_ptr->reset = true; + } # else constexpr const bool ready = true; # endif