Move dry-run option to common code.
This commit is contained in:
parent
48a214c3f1
commit
dba78717fa
4 changed files with 25 additions and 23 deletions
|
@ -44,6 +44,7 @@ xmrig::CommonConfig::CommonConfig() :
|
|||
m_apiRestricted(true),
|
||||
m_background(false),
|
||||
m_colors(true),
|
||||
m_dryRun(false),
|
||||
m_syslog(false),
|
||||
|
||||
# ifdef XMRIG_PROXY_PROJECT
|
||||
|
@ -172,9 +173,15 @@ bool xmrig::CommonConfig::parseBoolean(int key, bool enable)
|
|||
|
||||
case ApiIPv6Key: /* ipv6 */
|
||||
m_apiIPv6 = enable;
|
||||
break;
|
||||
|
||||
case ApiRestrictedKey: /* restricted */
|
||||
m_apiRestricted = enable;
|
||||
break;
|
||||
|
||||
case IConfig::DryRunKey: /* --dry-run */
|
||||
m_dryRun = enable;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -259,6 +266,7 @@ bool xmrig::CommonConfig::parseString(int key, const char *arg)
|
|||
case KeepAliveKey: /* --keepalive */
|
||||
case NicehashKey: /* --nicehash */
|
||||
case ApiIPv6Key: /* --api-ipv6 */
|
||||
case DryRunKey: /* --dry-run */
|
||||
return parseBoolean(key, true);
|
||||
|
||||
case ColorKey: /* --no-color */
|
||||
|
|
|
@ -47,6 +47,7 @@ public:
|
|||
inline bool isApiRestricted() const { return m_apiRestricted; }
|
||||
inline bool isBackground() const { return m_background; }
|
||||
inline bool isColors() const { return m_colors; }
|
||||
inline bool isDryRun() const { return m_dryRun; }
|
||||
inline bool isSyslog() const { return m_syslog; }
|
||||
inline const char *apiToken() const { return m_apiToken.data(); }
|
||||
inline const char *apiWorkerId() const { return m_apiWorkerId.data(); }
|
||||
|
@ -85,6 +86,7 @@ protected:
|
|||
bool m_apiRestricted;
|
||||
bool m_background;
|
||||
bool m_colors;
|
||||
bool m_dryRun;
|
||||
bool m_syslog;
|
||||
bool m_watch;
|
||||
int m_apiPort;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue