mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-09 12:29:24 +00:00
Removed option --http-enabled.
This commit is contained in:
parent
290493e485
commit
0f05936e63
4 changed files with 13 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
# v4.0.2-beta
|
# v4.0.2-beta
|
||||||
- [#1183](https://github.com/xmrig/xmrig/issues/1183) Fixed compatibility with systemd.
|
- [#1183](https://github.com/xmrig/xmrig/issues/1183) Fixed compatibility with systemd.
|
||||||
- [#1185](https://github.com/xmrig/xmrig/pull/1185) Added JIT compiler for RandomX on ARMv8.
|
- [#1185](https://github.com/xmrig/xmrig/pull/1185) Added JIT compiler for RandomX on ARMv8.
|
||||||
|
- Command line option `--http-enabled` removed, HTTP API enabled automatically if any other `--http-*` option provided.
|
||||||
|
|
||||||
# v4.0.1-beta
|
# v4.0.1-beta
|
||||||
- [#1177](https://github.com/xmrig/xmrig/issues/1177) Fixed compatibility with old AMD drivers.
|
- [#1177](https://github.com/xmrig/xmrig/issues/1177) Fixed compatibility with old AMD drivers.
|
||||||
|
|
|
@ -102,6 +102,10 @@ void xmrig::BaseTransform::finalize(rapidjson::Document &doc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_http) {
|
||||||
|
set(doc, kHttp, "enabled", true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -164,9 +168,11 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
|
||||||
return set(doc, "log-file", arg);
|
return set(doc, "log-file", arg);
|
||||||
|
|
||||||
case IConfig::HttpAccessTokenKey: /* --http-access-token */
|
case IConfig::HttpAccessTokenKey: /* --http-access-token */
|
||||||
|
m_http = true;
|
||||||
return set(doc, kHttp, "access-token", arg);
|
return set(doc, kHttp, "access-token", arg);
|
||||||
|
|
||||||
case IConfig::HttpHostKey: /* --http-host */
|
case IConfig::HttpHostKey: /* --http-host */
|
||||||
|
m_http = true;
|
||||||
return set(doc, kHttp, "host", arg);
|
return set(doc, kHttp, "host", arg);
|
||||||
|
|
||||||
case IConfig::ApiWorkerIdKey: /* --api-worker-id */
|
case IConfig::ApiWorkerIdKey: /* --api-worker-id */
|
||||||
|
@ -235,10 +241,12 @@ void xmrig::BaseTransform::transformBoolean(rapidjson::Document &doc, int key, b
|
||||||
return set(doc, "colors", enable);
|
return set(doc, "colors", enable);
|
||||||
|
|
||||||
case IConfig::HttpRestrictedKey: /* --http-no-restricted */
|
case IConfig::HttpRestrictedKey: /* --http-no-restricted */
|
||||||
|
m_http = true;
|
||||||
return set(doc, kHttp, "restricted", enable);
|
return set(doc, kHttp, "restricted", enable);
|
||||||
|
|
||||||
case IConfig::HttpEnabledKey: /* --http-enabled */
|
case IConfig::HttpEnabledKey: /* --http-enabled */
|
||||||
return set(doc, kHttp, "enabled", enable);
|
m_http = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case IConfig::DryRunKey: /* --dry-run */
|
case IConfig::DryRunKey: /* --dry-run */
|
||||||
return set(doc, "dry-run", enable);
|
return set(doc, "dry-run", enable);
|
||||||
|
@ -265,6 +273,7 @@ void xmrig::BaseTransform::transformUint64(rapidjson::Document &doc, int key, ui
|
||||||
return set(doc, "donate-over-proxy", arg);
|
return set(doc, "donate-over-proxy", arg);
|
||||||
|
|
||||||
case IConfig::HttpPort: /* --http-port */
|
case IConfig::HttpPort: /* --http-port */
|
||||||
|
m_http = true;
|
||||||
return set(doc, kHttp, "port", arg);
|
return set(doc, kHttp, "port", arg);
|
||||||
|
|
||||||
case IConfig::PrintTimeKey: /* --print-time */
|
case IConfig::PrintTimeKey: /* --print-time */
|
||||||
|
|
|
@ -102,6 +102,8 @@ protected:
|
||||||
private:
|
private:
|
||||||
void transformBoolean(rapidjson::Document &doc, int key, bool enable);
|
void transformBoolean(rapidjson::Document &doc, int key, bool enable);
|
||||||
void transformUint64(rapidjson::Document &doc, int key, uint64_t arg);
|
void transformUint64(rapidjson::Document &doc, int key, uint64_t arg);
|
||||||
|
|
||||||
|
bool m_http = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,6 @@ static inline const std::string &usage()
|
||||||
u += "\nAPI:\n";
|
u += "\nAPI:\n";
|
||||||
u += " --api-worker-id=ID custom worker-id for API\n";
|
u += " --api-worker-id=ID custom worker-id for API\n";
|
||||||
u += " --api-id=ID custom instance ID for API\n";
|
u += " --api-id=ID custom instance ID for API\n";
|
||||||
u += " --http-enabled enable HTTP API\n";
|
|
||||||
u += " --http-host=HOST bind host for HTTP API (default: 127.0.0.1)\n";
|
u += " --http-host=HOST bind host for HTTP API (default: 127.0.0.1)\n";
|
||||||
u += " --http-port=N bind port for HTTP API\n";
|
u += " --http-port=N bind port for HTTP API\n";
|
||||||
u += " --http-access-token=T access token for HTTP API\n";
|
u += " --http-access-token=T access token for HTTP API\n";
|
||||||
|
|
Loading…
Reference in a new issue