Skip to content

Commit 3a67ee6

Browse files
committed
Small fixes.
1 parent c227e3c commit 3a67ee6

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

src/core/CommonConfig.cpp

+10-7
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ xmrig::CommonConfig::CommonConfig() :
5858
m_background(false),
5959
m_colors(true),
6060
m_syslog(false),
61+
62+
# ifdef XMRIG_PROXY_PROJECT
63+
m_watch(true),
64+
# else
6165
m_watch(false), // TODO: enable config file watch by default when this feature propertly handled and tested.
66+
# endif
67+
6268
m_apiToken(nullptr),
6369
m_apiWorkerId(nullptr),
6470
m_fileName(nullptr),
@@ -233,7 +239,6 @@ bool xmrig::CommonConfig::parseString(int key, const char *arg)
233239
case VariantKey: /* --variant */
234240
case ApiPort: /* --api-port */
235241
case PrintTimeKey: /* --cpu-priority */
236-
case DonateLevelKey: /* --donate-level */
237242
return parseUint64(key, strtol(arg, nullptr, 10));
238243

239244
case BackgroundKey: /* --background */
@@ -248,16 +253,14 @@ bool xmrig::CommonConfig::parseString(int key, const char *arg)
248253
case ApiIPv6Key: /* --api-no-ipv6 */
249254
return parseBoolean(key, false);
250255

251-
# ifdef XMRIG_PROXY_PROJECT
252256
case DonateLevelKey: /* --donate-level */
257+
# ifdef XMRIG_PROXY_PROJECT
253258
if (strncmp(arg, "minemonero.pro", 14) == 0) {
254259
m_donateLevel = 0;
260+
return true;
255261
}
256-
else {
257-
parseUint64(key, strtol(arg, nullptr, 10));
258-
}
259-
break;
260-
# endif
262+
# endif
263+
return parseUint64(key, strtol(arg, nullptr, 10));
261264

262265
default:
263266
break;

src/crypto/CryptoNight_constants.h

+6
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ inline size_t cn_select_memory(Algo algorithm)
6666
case CRYPTONIGHT_HEAVY:
6767
return CRYPTONIGHT_HEAVY_MEMORY;
6868
}
69+
70+
return 0;
6971
}
7072

7173

@@ -87,6 +89,8 @@ inline uint32_t cn_select_mask(Algo algorithm)
8789
case CRYPTONIGHT_HEAVY:
8890
return CRYPTONIGHT_HEAVY_MASK;
8991
}
92+
93+
return 0;
9094
}
9195

9296

@@ -108,6 +112,8 @@ inline uint32_t cn_select_iter(Algo algorithm)
108112
case CRYPTONIGHT_HEAVY:
109113
return CRYPTONIGHT_HEAVY_ITER;
110114
}
115+
116+
return 0;
111117
}
112118

113119

src/workers/SingleWorker.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ bool SingleWorker::selfTest()
116116
}
117117
# endif
118118

119-
return memcmp(m_result.result, test_output_heavy, 32) == 0;
119+
return m_thread->algorithm() == xmrig::CRYPTONIGHT_HEAVY && memcmp(m_result.result, test_output_heavy, 32) == 0;
120120
}
121121

122122

0 commit comments

Comments
 (0)