mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-25 20:16:05 +00:00
Removed --variant option, use --algo instead.
This commit is contained in:
parent
dc2c0552e0
commit
3fb180f04e
4 changed files with 24 additions and 12 deletions
|
@ -44,6 +44,7 @@
|
||||||
namespace xmrig
|
namespace xmrig
|
||||||
{
|
{
|
||||||
|
|
||||||
|
static const char *kAlgo = "algo";
|
||||||
static const char *kApi = "api";
|
static const char *kApi = "api";
|
||||||
static const char *kHttp = "http";
|
static const char *kHttp = "http";
|
||||||
static const char *kPools = "pools";
|
static const char *kPools = "pools";
|
||||||
|
@ -100,7 +101,9 @@ void xmrig::BaseTransform::finalize(rapidjson::Document &doc)
|
||||||
if (m_algorithm.isValid() && doc.HasMember(kPools)) {
|
if (m_algorithm.isValid() && doc.HasMember(kPools)) {
|
||||||
auto &pools = doc[kPools];
|
auto &pools = doc[kPools];
|
||||||
for (Value &pool : pools.GetArray()) {
|
for (Value &pool : pools.GetArray()) {
|
||||||
pool.AddMember(StringRef("algo"), m_algorithm.toJSON(), allocator);
|
if (!pool.HasMember(kAlgo)) {
|
||||||
|
pool.AddMember(StringRef(kAlgo), m_algorithm.toJSON(), allocator);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,7 +113,12 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
|
||||||
{
|
{
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case IConfig::AlgorithmKey: /* --algo */
|
case IConfig::AlgorithmKey: /* --algo */
|
||||||
m_algorithm = arg;
|
if (!doc.HasMember(kPools)) {
|
||||||
|
m_algorithm = arg;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return add(doc, kPools, kAlgo, arg);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IConfig::UserpassKey: /* --userpass */
|
case IConfig::UserpassKey: /* --userpass */
|
||||||
|
@ -144,9 +152,6 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
|
||||||
case IConfig::FingerprintKey: /* --tls-fingerprint */
|
case IConfig::FingerprintKey: /* --tls-fingerprint */
|
||||||
return add(doc, kPools, "tls-fingerprint", arg);
|
return add(doc, kPools, "tls-fingerprint", arg);
|
||||||
|
|
||||||
case IConfig::VariantKey: /* --variant */
|
|
||||||
return add(doc, kPools, "variant", arg);
|
|
||||||
|
|
||||||
case IConfig::LogFileKey: /* --log-file */
|
case IConfig::LogFileKey: /* --log-file */
|
||||||
return set(doc, "log-file", arg);
|
return set(doc, "log-file", arg);
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,6 @@ public:
|
||||||
UserAgentKey = 1008,
|
UserAgentKey = 1008,
|
||||||
UserKey = 'u',
|
UserKey = 'u',
|
||||||
UserpassKey = 'O',
|
UserpassKey = 'O',
|
||||||
VariantKey = 1010,
|
|
||||||
VerboseKey = 1100,
|
VerboseKey = 1100,
|
||||||
TlsKey = 1013,
|
TlsKey = 1013,
|
||||||
FingerprintKey = 1014,
|
FingerprintKey = 1014,
|
||||||
|
|
|
@ -65,7 +65,6 @@ static const option options[] = {
|
||||||
{ "nicehash", 0, nullptr, IConfig::NicehashKey },
|
{ "nicehash", 0, nullptr, IConfig::NicehashKey },
|
||||||
{ "no-color", 0, nullptr, IConfig::ColorKey },
|
{ "no-color", 0, nullptr, IConfig::ColorKey },
|
||||||
{ "no-huge-pages", 0, nullptr, IConfig::HugePagesKey },
|
{ "no-huge-pages", 0, nullptr, IConfig::HugePagesKey },
|
||||||
{ "variant", 1, nullptr, IConfig::VariantKey },
|
|
||||||
{ "pass", 1, nullptr, IConfig::PasswordKey },
|
{ "pass", 1, nullptr, IConfig::PasswordKey },
|
||||||
{ "print-time", 1, nullptr, IConfig::PrintTimeKey },
|
{ "print-time", 1, nullptr, IConfig::PrintTimeKey },
|
||||||
{ "retries", 1, nullptr, IConfig::RetriesKey },
|
{ "retries", 1, nullptr, IConfig::RetriesKey },
|
||||||
|
|
|
@ -36,18 +36,28 @@ static char const usage[] = "\
|
||||||
Usage: " APP_ID " [OPTIONS]\n\
|
Usage: " APP_ID " [OPTIONS]\n\
|
||||||
Options:\n\
|
Options:\n\
|
||||||
-a, --algo=ALGO specify the algorithm to use\n\
|
-a, --algo=ALGO specify the algorithm to use\n\
|
||||||
cryptonight\n"
|
cn/r, cn/2, cn/1, cn/0, cn/double, cn/half, cn/fast,\n\
|
||||||
|
cn/rwz, cn/zls, cn/xao, cn/rto"
|
||||||
|
#ifdef XMRIG_ALGO_CN_GPU
|
||||||
|
", cn/gpu,\n"
|
||||||
|
#else
|
||||||
|
",\n"
|
||||||
|
#endif
|
||||||
#ifdef XMRIG_ALGO_CN_LITE
|
#ifdef XMRIG_ALGO_CN_LITE
|
||||||
"\
|
"\
|
||||||
cryptonight-lite\n"
|
cn-lite/1,\n"
|
||||||
#endif
|
#endif
|
||||||
#ifdef XMRIG_ALGO_CN_HEAVY
|
#ifdef XMRIG_ALGO_CN_HEAVY
|
||||||
"\
|
"\
|
||||||
cryptonight-heavy\n"
|
cn-heavy/xhv, cn-heavy/tube, cn-heavy/0,\n"
|
||||||
#endif
|
#endif
|
||||||
#ifdef XMRIG_ALGO_CN_PICO
|
#ifdef XMRIG_ALGO_CN_PICO
|
||||||
"\
|
"\
|
||||||
cryptonight-pico\n"
|
cn-pico,\n"
|
||||||
|
#endif
|
||||||
|
#ifdef XMRIG_ALGO_RANDOMX
|
||||||
|
"\
|
||||||
|
rx/wow, rx/loki\n"
|
||||||
#endif
|
#endif
|
||||||
"\
|
"\
|
||||||
-o, --url=URL URL of mining server\n\
|
-o, --url=URL URL of mining server\n\
|
||||||
|
@ -76,7 +86,6 @@ Options:\n\
|
||||||
--cpu-priority set process priority (0 idle, 2 normal to 5 highest)\n\
|
--cpu-priority set process priority (0 idle, 2 normal to 5 highest)\n\
|
||||||
--no-huge-pages disable huge pages support\n\
|
--no-huge-pages disable huge pages support\n\
|
||||||
--no-color disable colored output\n\
|
--no-color disable colored output\n\
|
||||||
--variant algorithm PoW variant\n\
|
|
||||||
--donate-level=N donate level, default 5%% (5 minutes in 100 minutes)\n\
|
--donate-level=N donate level, default 5%% (5 minutes in 100 minutes)\n\
|
||||||
--user-agent set custom user-agent string for pool\n\
|
--user-agent set custom user-agent string for pool\n\
|
||||||
-B, --background run the miner in the background\n\
|
-B, --background run the miner in the background\n\
|
||||||
|
|
Loading…
Reference in a new issue