Fixed miner freeze when switch between RandomX variants.

This commit is contained in:
XMRig 2019-07-28 14:42:29 +07:00
parent ef2454b025
commit ab02bd9847
4 changed files with 15 additions and 0 deletions

View file

@ -170,6 +170,15 @@ const xmrig::String &xmrig::CpuBackend::type() const
}
void xmrig::CpuBackend::prepare(const Job &nextJob)
{
if (nextJob.algorithm().family() == Algorithm::RANDOM_X && nextJob.algorithm() != d_ptr->algo) {
d_ptr->workers.stop();
d_ptr->threads.clear();
}
}
void xmrig::CpuBackend::printHashrate(bool details)
{
if (!details || !hashrate()) {