From 86c738cf317c7f63ed9592b2105656a62eb35022 Mon Sep 17 00:00:00 2001 From: MoneroOcean Date: Thu, 22 Apr 2021 23:46:43 +0000 Subject: [PATCH] Added progressive algo perf upstream threshold --- src/base/net/stratum/AlgoSwitch.cpp | 2 +- src/config.json | 2 +- src/version.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/base/net/stratum/AlgoSwitch.cpp b/src/base/net/stratum/AlgoSwitch.cpp index fe63a82cf..282b4be9a 100644 --- a/src/base/net/stratum/AlgoSwitch.cpp +++ b/src/base/net/stratum/AlgoSwitch.cpp @@ -112,7 +112,7 @@ bool AlgoSwitch::try_miner(const Miner* miner, const int upstream_count) const { return false; } const float ratio = i1->second / m_miner_algo_perfs.size() / i2->second; - if (ratio > (1.0f + (float)(m_percent) / 100.0f) || ratio < (1.0f - (float)(m_percent) / 100.0f)) return false; + if (ratio > (1.0f + (float)(m_percent + upstream_count) / 100.0f) || ratio < (1.0f - (float)(m_percent + upstream_count) / 100.0f)) return false; } return true; } diff --git a/src/config.json b/src/config.json index 4dae6fab5..889fc0469 100644 --- a/src/config.json +++ b/src/config.json @@ -51,7 +51,7 @@ "retries": 2, "retry-pause": 1, "reuse-timeout": 0, - "algo-perf-same-threshold": 50, + "algo-perf-same-threshold": 20, "tls": { "enabled": true, "protocols": null, diff --git a/src/version.h b/src/version.h index ba1abafd8..044336c14 100644 --- a/src/version.h +++ b/src/version.h @@ -22,7 +22,7 @@ #define APP_ID "xmrig-proxy" #define APP_NAME "xmrig-proxy" #define APP_DESC "XMRig Stratum proxy" -#define APP_VERSION "6.12.0-mo1" +#define APP_VERSION "6.12.0-mo2" #define APP_DOMAIN "xmrig.com" #define APP_SITE "www.xmrig.com" #define APP_COPYRIGHT "Copyright (C) 2016-2020 xmrig.com"