Fixed miner freeze when switch between RandomX variants.

This commit is contained in:
XMRig
2019-07-28 14:42:29 +07:00
parent 39600aa891
commit d20cd9a069
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()) {