Removed option --http-enabled.

This commit is contained in:
XMRig 2019-09-23 04:53:33 +07:00
parent 290493e485
commit 0f05936e63
4 changed files with 13 additions and 2 deletions

View File

@ -1,6 +1,7 @@
# v4.0.2-beta
- [#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.
- Command line option `--http-enabled` removed, HTTP API enabled automatically if any other `--http-*` option provided.
# v4.0.1-beta
- [#1177](https://github.com/xmrig/xmrig/issues/1177) Fixed compatibility with old AMD drivers.

View File

@ -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);
case IConfig::HttpAccessTokenKey: /* --http-access-token */
m_http = true;
return set(doc, kHttp, "access-token", arg);
case IConfig::HttpHostKey: /* --http-host */
m_http = true;
return set(doc, kHttp, "host", arg);
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);
case IConfig::HttpRestrictedKey: /* --http-no-restricted */
m_http = true;
return set(doc, kHttp, "restricted", enable);
case IConfig::HttpEnabledKey: /* --http-enabled */
return set(doc, kHttp, "enabled", enable);
m_http = true;
break;
case IConfig::DryRunKey: /* --dry-run */
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);
case IConfig::HttpPort: /* --http-port */
m_http = true;
return set(doc, kHttp, "port", arg);
case IConfig::PrintTimeKey: /* --print-time */

View File

@ -102,6 +102,8 @@ protected:
private:
void transformBoolean(rapidjson::Document &doc, int key, bool enable);
void transformUint64(rapidjson::Document &doc, int key, uint64_t arg);
bool m_http = false;
};

View File

@ -87,7 +87,6 @@ static inline const std::string &usage()
u += "\nAPI:\n";
u += " --api-worker-id=ID custom worker-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-port=N bind port for HTTP API\n";
u += " --http-access-token=T access token for HTTP API\n";