From fac7f8d56eed76ba6bdde974543c002004f071bf Mon Sep 17 00:00:00 2001 From: XMRig Date: Fri, 23 Aug 2019 00:56:51 +0700 Subject: [PATCH] Special handle for cn/2 based algorithms. --- src/backend/common/Threads.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/backend/common/Threads.cpp b/src/backend/common/Threads.cpp index 04bf1b02..bb9e440f 100644 --- a/src/backend/common/Threads.cpp +++ b/src/backend/common/Threads.cpp @@ -25,6 +25,7 @@ #include "backend/common/Threads.h" #include "backend/cpu/CpuThreads.h" +#include "crypto/cn/CnAlgo.h" #include "rapidjson/document.h" @@ -37,6 +38,7 @@ namespace xmrig { static const char *kAsterisk = "*"; +static const char *kCn2 = "cn/2"; } // namespace xmrig @@ -118,6 +120,10 @@ xmrig::String xmrig::Threads::profileName(const Algorithm &algorithm, bool st return String(); } + if (algorithm.family() == Algorithm::CN && CnAlgo<>::base(algorithm) == Algorithm::CN_2 && has(kCn2)) { + return kCn2; + } + if (name.contains("/")) { const String base = name.split('/').at(0); if (has(base)) {