From a13f5a480596265b97cd9f255697a8903dc795a7 Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Mon, 24 Jun 2024 20:08:30 -0600 Subject: [PATCH] CpuBackend: do not return early if algo changed but threads are same fixes bug where backend did not stop and reinitialize on some systems between rx/0 and flex or such when thread profiles were the same --- src/backend/cpu/CpuBackend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/cpu/CpuBackend.cpp b/src/backend/cpu/CpuBackend.cpp index a32ce857dd..3fb64e1e82 100644 --- a/src/backend/cpu/CpuBackend.cpp +++ b/src/backend/cpu/CpuBackend.cpp @@ -352,7 +352,7 @@ void xmrig::CpuBackend::setJob(const Job &job) const auto &cpu = d_ptr->controller->config()->cpu(); auto threads = cpu.get(d_ptr->controller->miner(), job.algorithm()); - if (!d_ptr->threads.empty() && d_ptr->threads.size() == threads.size() && std::equal(d_ptr->threads.begin(), d_ptr->threads.end(), threads.begin())) { + if (!d_ptr->threads.empty() && d_ptr->threads.size() == threads.size() && std::equal(d_ptr->threads.begin(), d_ptr->threads.end(), threads.begin()) && d_ptr->algo == job.algorithm()) { return; }