mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-10 17:12:46 -05:00
Small fixes.
This commit is contained in:
@@ -58,7 +58,13 @@ xmrig::CommonConfig::CommonConfig() :
|
|||||||
m_background(false),
|
m_background(false),
|
||||||
m_colors(true),
|
m_colors(true),
|
||||||
m_syslog(false),
|
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.
|
m_watch(false), // TODO: enable config file watch by default when this feature propertly handled and tested.
|
||||||
|
# endif
|
||||||
|
|
||||||
m_apiToken(nullptr),
|
m_apiToken(nullptr),
|
||||||
m_apiWorkerId(nullptr),
|
m_apiWorkerId(nullptr),
|
||||||
m_fileName(nullptr),
|
m_fileName(nullptr),
|
||||||
@@ -233,7 +239,6 @@ bool xmrig::CommonConfig::parseString(int key, const char *arg)
|
|||||||
case VariantKey: /* --variant */
|
case VariantKey: /* --variant */
|
||||||
case ApiPort: /* --api-port */
|
case ApiPort: /* --api-port */
|
||||||
case PrintTimeKey: /* --cpu-priority */
|
case PrintTimeKey: /* --cpu-priority */
|
||||||
case DonateLevelKey: /* --donate-level */
|
|
||||||
return parseUint64(key, strtol(arg, nullptr, 10));
|
return parseUint64(key, strtol(arg, nullptr, 10));
|
||||||
|
|
||||||
case BackgroundKey: /* --background */
|
case BackgroundKey: /* --background */
|
||||||
@@ -248,16 +253,14 @@ bool xmrig::CommonConfig::parseString(int key, const char *arg)
|
|||||||
case ApiIPv6Key: /* --api-no-ipv6 */
|
case ApiIPv6Key: /* --api-no-ipv6 */
|
||||||
return parseBoolean(key, false);
|
return parseBoolean(key, false);
|
||||||
|
|
||||||
# ifdef XMRIG_PROXY_PROJECT
|
|
||||||
case DonateLevelKey: /* --donate-level */
|
case DonateLevelKey: /* --donate-level */
|
||||||
|
# ifdef XMRIG_PROXY_PROJECT
|
||||||
if (strncmp(arg, "minemonero.pro", 14) == 0) {
|
if (strncmp(arg, "minemonero.pro", 14) == 0) {
|
||||||
m_donateLevel = 0;
|
m_donateLevel = 0;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
parseUint64(key, strtol(arg, nullptr, 10));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
# endif
|
# endif
|
||||||
|
return parseUint64(key, strtol(arg, nullptr, 10));
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ inline size_t cn_select_memory(Algo algorithm)
|
|||||||
case CRYPTONIGHT_HEAVY:
|
case CRYPTONIGHT_HEAVY:
|
||||||
return CRYPTONIGHT_HEAVY_MEMORY;
|
return CRYPTONIGHT_HEAVY_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -87,6 +89,8 @@ inline uint32_t cn_select_mask(Algo algorithm)
|
|||||||
case CRYPTONIGHT_HEAVY:
|
case CRYPTONIGHT_HEAVY:
|
||||||
return CRYPTONIGHT_HEAVY_MASK;
|
return CRYPTONIGHT_HEAVY_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -108,6 +112,8 @@ inline uint32_t cn_select_iter(Algo algorithm)
|
|||||||
case CRYPTONIGHT_HEAVY:
|
case CRYPTONIGHT_HEAVY:
|
||||||
return CRYPTONIGHT_HEAVY_ITER;
|
return CRYPTONIGHT_HEAVY_ITER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ bool SingleWorker::selfTest()
|
|||||||
}
|
}
|
||||||
# endif
|
# 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user