mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-05 16:07:42 +00:00
Sync changes with proxy.
This commit is contained in:
parent
6dda4ad41c
commit
14f0e8658c
3 changed files with 39 additions and 20 deletions
|
@ -30,6 +30,7 @@
|
|||
#include <vector>
|
||||
|
||||
|
||||
#include "common/crypto/Algorithm.h"
|
||||
#include "common/net/Id.h"
|
||||
#include "common/net/Job.h"
|
||||
#include "common/net/Pool.h"
|
||||
|
@ -73,6 +74,7 @@ public:
|
|||
inline int id() const { return m_id; }
|
||||
inline SocketState state() const { return m_state; }
|
||||
inline uint16_t port() const { return m_pool.port(); }
|
||||
inline void setAlgo(const xmrig::Algorithm &algo) { m_pool.setAlgo(algo); }
|
||||
inline void setQuiet(bool quiet) { m_quiet = quiet; }
|
||||
inline void setRetries(int retries) { m_retries = retries; }
|
||||
inline void setRetryPause(int ms) { m_retryPause = ms; }
|
||||
|
|
|
@ -247,17 +247,15 @@ void Pool::adjust(xmrig::Algo algorithm)
|
|||
m_algorithm.setVariant(xmrig::VARIANT_1);
|
||||
}
|
||||
|
||||
m_algorithms.push_back(m_algorithm);
|
||||
|
||||
# ifndef XMRIG_PROXY_PROJECT
|
||||
if (m_algorithm.algo() != xmrig::CRYPTONIGHT_HEAVY) {
|
||||
addVariant(xmrig::VARIANT_1);
|
||||
addVariant(xmrig::VARIANT_0);
|
||||
addVariant(xmrig::VARIANT_XTL);
|
||||
addVariant(xmrig::VARIANT_IPBC);
|
||||
addVariant(xmrig::VARIANT_AUTO);
|
||||
rebuild();
|
||||
}
|
||||
# endif
|
||||
|
||||
|
||||
void Pool::setAlgo(const xmrig::Algorithm &algorithm)
|
||||
{
|
||||
m_algorithm = algorithm;
|
||||
|
||||
rebuild();
|
||||
}
|
||||
|
||||
|
||||
|
@ -309,3 +307,20 @@ void Pool::addVariant(xmrig::Variant variant)
|
|||
|
||||
m_algorithms.push_back(algorithm);
|
||||
}
|
||||
|
||||
|
||||
void Pool::rebuild()
|
||||
{
|
||||
m_algorithms.clear();
|
||||
m_algorithms.push_back(m_algorithm);
|
||||
|
||||
# ifndef XMRIG_PROXY_PROJECT
|
||||
if (m_algorithm.algo() != xmrig::CRYPTONIGHT_HEAVY) {
|
||||
addVariant(xmrig::VARIANT_1);
|
||||
addVariant(xmrig::VARIANT_0);
|
||||
addVariant(xmrig::VARIANT_XTL);
|
||||
addVariant(xmrig::VARIANT_IPBC);
|
||||
addVariant(xmrig::VARIANT_AUTO);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ public:
|
|||
bool setUserpass(const char *userpass);
|
||||
rapidjson::Value toJSON(rapidjson::Document &doc) const;
|
||||
void adjust(xmrig::Algo algorithm);
|
||||
void setAlgo(const xmrig::Algorithm &algorithm);
|
||||
|
||||
# ifdef APP_DEBUG
|
||||
void print() const;
|
||||
|
@ -86,6 +87,7 @@ public:
|
|||
private:
|
||||
bool parseIPv6(const char *addr);
|
||||
void addVariant(xmrig::Variant variant);
|
||||
void rebuild();
|
||||
|
||||
bool m_nicehash;
|
||||
int m_keepAlive;
|
||||
|
|
Loading…
Reference in a new issue