Added cn/half algo support
This commit is contained in:
parent
a78c014511
commit
3ca70e2276
6 changed files with 14 additions and 9 deletions
|
@ -136,7 +136,7 @@ int App::exec()
|
|||
// run benchmark before pool mining or not?
|
||||
if (m_controller->config()->get_algo_perf(xmrig::PA_CN) == 0.0f || m_controller->config()->isCalibrateAlgo()) {
|
||||
benchmark.set_controller(m_controller); // we need controller there to access config and network objects
|
||||
Workers::setListener(&benchmark); // register benchmark as job reault listener to compute hashrates there
|
||||
Workers::setListener(&benchmark); // register benchmark as job result listener to compute hashrates there
|
||||
// write text before first benchmark round
|
||||
Log::i()->text(m_controller->config()->isColors()
|
||||
? GREEN_BOLD(" >>>>> ") WHITE_BOLD("STARTING ALGO PERFORMANCE CALIBRATION (with %i seconds round)")
|
||||
|
|
|
@ -272,7 +272,7 @@ const char *xmrig::Algorithm::perfAlgoName(const xmrig::PerfAlgo pa) {
|
|||
static const char* perf_algo_names[xmrig::PerfAlgo::PA_MAX] = {
|
||||
"cn",
|
||||
"cn/2",
|
||||
"cn/msr",
|
||||
"cn/half",
|
||||
"cn-lite",
|
||||
"cn-heavy",
|
||||
};
|
||||
|
@ -290,9 +290,9 @@ xmrig::Algorithm::Algorithm(const xmrig::PerfAlgo pa) {
|
|||
m_algo = xmrig::CRYPTONIGHT;
|
||||
m_variant = xmrig::VARIANT_2;
|
||||
break;
|
||||
case PA_CN_FAST:
|
||||
case PA_CN_HALF:
|
||||
m_algo = xmrig::CRYPTONIGHT;
|
||||
m_variant = xmrig::VARIANT_MSR;
|
||||
m_variant = xmrig::VARIANT_HALF;
|
||||
break;
|
||||
case PA_CN_LITE:
|
||||
m_algo = xmrig::CRYPTONIGHT_LITE;
|
||||
|
@ -310,9 +310,13 @@ xmrig::Algorithm::Algorithm(const xmrig::PerfAlgo pa) {
|
|||
|
||||
// returns PerfAlgo that corresponds to current Algorithm
|
||||
xmrig::PerfAlgo xmrig::Algorithm::perf_algo() const {
|
||||
if (m_variant == VARIANT_MSR) return PA_CN_FAST;
|
||||
switch (m_algo) {
|
||||
case CRYPTONIGHT: return m_variant == VARIANT_2 ? PA_CN2 : PA_CN;
|
||||
case CRYPTONIGHT:
|
||||
switch (m_variant) {
|
||||
case VARIANT_2: return PA_CN2;
|
||||
case VARIANT_HALF: return PA_CN_HALF;
|
||||
default: return PA_CN;
|
||||
}
|
||||
case CRYPTONIGHT_LITE: return PA_CN_LITE;
|
||||
case CRYPTONIGHT_HEAVY: return PA_CN_HEAVY;
|
||||
default: return PA_INVALID;
|
||||
|
|
|
@ -59,6 +59,7 @@ Pool::Pool() :
|
|||
m_algorithms.push_back(xmrig::Algorithm(xmrig::CRYPTONIGHT, xmrig::VARIANT_MSR));
|
||||
m_algorithms.push_back(xmrig::Algorithm(xmrig::CRYPTONIGHT, xmrig::VARIANT_XAO));
|
||||
m_algorithms.push_back(xmrig::Algorithm(xmrig::CRYPTONIGHT, xmrig::VARIANT_RTO));
|
||||
m_algorithms.push_back(xmrig::Algorithm(xmrig::CRYPTONIGHT, xmrig::VARIANT_HALF));
|
||||
|
||||
m_algorithms.push_back(xmrig::Algorithm(xmrig::CRYPTONIGHT_LITE, xmrig::VARIANT_1));
|
||||
m_algorithms.push_back(xmrig::Algorithm(xmrig::CRYPTONIGHT_LITE, xmrig::VARIANT_0));
|
||||
|
|
|
@ -44,7 +44,7 @@ enum PerfAlgo {
|
|||
PA_INVALID = -1,
|
||||
PA_CN, /* CryptoNight (Monero) */
|
||||
PA_CN2, /* CryptoNight/2 (Monero) */
|
||||
PA_CN_FAST, /* CryptoNight-Fast (Masari) */
|
||||
PA_CN_HALF, /* CryptoNight-Half (Masari) */
|
||||
PA_CN_LITE, /* CryptoNight-Lite (AEON) */
|
||||
PA_CN_HEAVY, /* CryptoNight-Heavy (SUMO) */
|
||||
PA_MAX
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright 2018 MoneroOcean <https://github.com/MoneroOcean>, <support@moneroocean.stream>
|
||||
* Copyright 2018-2019 MoneroOcean <https://github.com/MoneroOcean>, <support@moneroocean.stream>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright 2018 MoneroOcean <https://github.com/MoneroOcean>, <support@moneroocean.stream>
|
||||
* Copyright 2018-2019 MoneroOcean <https://github.com/MoneroOcean>, <support@moneroocean.stream>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue