Merge pull request #3531 from SChernykh/dev

Always reset nonce on RandomX dataset change
This commit is contained in:
xmrig 2024-08-14 22:16:34 +07:00 committed by GitHub
commit 56baec762f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 3 deletions

View file

@ -359,7 +359,9 @@ void xmrig::CpuWorker<N>::start()
} }
} }
consumeJob(); if (!Nonce::isPaused()) {
consumeJob();
}
} }
} }

View file

@ -158,7 +158,7 @@ void xmrig::CudaWorker::start()
std::this_thread::yield(); std::this_thread::yield();
} }
if (!consumeJob()) { if (isReady() && !consumeJob()) {
return; return;
} }
} }

View file

@ -190,7 +190,7 @@ void xmrig::OclWorker::start()
std::this_thread::yield(); std::this_thread::yield();
} }
if (!consumeJob()) { if (isReady() && !consumeJob()) {
return; return;
} }
} }

View file

@ -576,6 +576,11 @@ void xmrig::Miner::setJob(const Job &job, bool donate)
# ifdef XMRIG_ALGO_RANDOMX # ifdef XMRIG_ALGO_RANDOMX
const bool ready = d_ptr->initRX(); const bool ready = d_ptr->initRX();
// Always reset nonce on RandomX dataset change
if (!ready) {
d_ptr->reset = true;
}
# else # else
constexpr const bool ready = true; constexpr const bool ready = true;
# endif # endif