mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-10 21:04:37 +00:00
Small fixes.
This commit is contained in:
parent
c227e3c7b4
commit
3a67ee6d11
3 changed files with 17 additions and 8 deletions
|
@ -58,7 +58,13 @@ xmrig::CommonConfig::CommonConfig() :
|
|||
m_background(false),
|
||||
m_colors(true),
|
||||
m_syslog(false),
|
||||
|
||||
# ifdef XMRIG_PROXY_PROJECT
|
||||
m_watch(true),
|
||||
# else
|
||||
m_watch(false), // TODO: enable config file watch by default when this feature propertly handled and tested.
|
||||
# endif
|
||||
|
||||
m_apiToken(nullptr),
|
||||
m_apiWorkerId(nullptr),
|
||||
m_fileName(nullptr),
|
||||
|
@ -233,7 +239,6 @@ bool xmrig::CommonConfig::parseString(int key, const char *arg)
|
|||
case VariantKey: /* --variant */
|
||||
case ApiPort: /* --api-port */
|
||||
case PrintTimeKey: /* --cpu-priority */
|
||||
case DonateLevelKey: /* --donate-level */
|
||||
return parseUint64(key, strtol(arg, nullptr, 10));
|
||||
|
||||
case BackgroundKey: /* --background */
|
||||
|
@ -248,16 +253,14 @@ bool xmrig::CommonConfig::parseString(int key, const char *arg)
|
|||
case ApiIPv6Key: /* --api-no-ipv6 */
|
||||
return parseBoolean(key, false);
|
||||
|
||||
# ifdef XMRIG_PROXY_PROJECT
|
||||
case DonateLevelKey: /* --donate-level */
|
||||
# ifdef XMRIG_PROXY_PROJECT
|
||||
if (strncmp(arg, "minemonero.pro", 14) == 0) {
|
||||
m_donateLevel = 0;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
parseUint64(key, strtol(arg, nullptr, 10));
|
||||
}
|
||||
break;
|
||||
# endif
|
||||
# endif
|
||||
return parseUint64(key, strtol(arg, nullptr, 10));
|
||||
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -66,6 +66,8 @@ inline size_t cn_select_memory(Algo algorithm)
|
|||
case CRYPTONIGHT_HEAVY:
|
||||
return CRYPTONIGHT_HEAVY_MEMORY;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -87,6 +89,8 @@ inline uint32_t cn_select_mask(Algo algorithm)
|
|||
case CRYPTONIGHT_HEAVY:
|
||||
return CRYPTONIGHT_HEAVY_MASK;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -108,6 +112,8 @@ inline uint32_t cn_select_iter(Algo algorithm)
|
|||
case CRYPTONIGHT_HEAVY:
|
||||
return CRYPTONIGHT_HEAVY_ITER;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ bool SingleWorker::selfTest()
|
|||
}
|
||||
# endif
|
||||
|
||||
return memcmp(m_result.result, test_output_heavy, 32) == 0;
|
||||
return m_thread->algorithm() == xmrig::CRYPTONIGHT_HEAVY && memcmp(m_result.result, test_output_heavy, 32) == 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue