mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-12 01:42:48 -05:00
Fix --threads generates "*" profile without "kawpow":false to negate it.
This commit is contained in:
@@ -266,7 +266,7 @@ bool xmrig::CpuBackend::isEnabled() const
|
|||||||
|
|
||||||
bool xmrig::CpuBackend::isEnabled(const Algorithm &algorithm) const
|
bool xmrig::CpuBackend::isEnabled(const Algorithm &algorithm) const
|
||||||
{
|
{
|
||||||
return !d_ptr->controller->config()->cpu().threads().get(algorithm).isEmpty();
|
return algorithm.isValid() && !d_ptr->controller->config()->cpu().threads().get(algorithm).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,9 @@ static const char *kAsterisk = "*";
|
|||||||
static const char *kEnabled = "enabled";
|
static const char *kEnabled = "enabled";
|
||||||
static const char *kIntensity = "intensity";
|
static const char *kIntensity = "intensity";
|
||||||
static const char *kThreads = "threads";
|
static const char *kThreads = "threads";
|
||||||
|
#ifdef XMRIG_ALGO_KAWPOW
|
||||||
|
static const char *kKawPow = "kawpow";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static inline uint64_t intensity(uint64_t av)
|
static inline uint64_t intensity(uint64_t av)
|
||||||
@@ -103,6 +106,9 @@ void xmrig::ConfigTransform::finalize(rapidjson::Document &doc)
|
|||||||
profile.AddMember(StringRef(kThreads), m_threads, allocator);
|
profile.AddMember(StringRef(kThreads), m_threads, allocator);
|
||||||
profile.AddMember(StringRef(kAffinity), m_affinity, allocator);
|
profile.AddMember(StringRef(kAffinity), m_affinity, allocator);
|
||||||
|
|
||||||
|
# ifdef XMRIG_ALGO_KAWPOW
|
||||||
|
doc[CpuConfig::kField].AddMember(StringRef(kKawPow), false, doc.GetAllocator());
|
||||||
|
# endif
|
||||||
doc[CpuConfig::kField].AddMember(StringRef(kAsterisk), profile, doc.GetAllocator());
|
doc[CpuConfig::kField].AddMember(StringRef(kAsterisk), profile, doc.GetAllocator());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user