From b1816005fdb6c587e40e2546ec4dff0fadc19b16 Mon Sep 17 00:00:00 2001 From: XMRig Date: Mon, 21 Jan 2019 19:16:49 +0700 Subject: [PATCH] Sync changes with proxy. --- src/common/crypto/Algorithm.cpp | 4 ++++ src/common/net/Job.h | 2 +- src/common/net/Pool.cpp | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/common/crypto/Algorithm.cpp b/src/common/crypto/Algorithm.cpp index d61f85b1c..6d408cd2f 100644 --- a/src/common/crypto/Algorithm.cpp +++ b/src/common/crypto/Algorithm.cpp @@ -234,6 +234,10 @@ void xmrig::Algorithm::parseVariant(int variant) void xmrig::Algorithm::setAlgo(Algo algo) { m_algo = algo; + + if (m_algo == CRYPTONIGHT_PICO && m_variant == VARIANT_AUTO) { + m_variant = xmrig::VARIANT_TRTL; + } } diff --git a/src/common/net/Job.h b/src/common/net/Job.h index 6922b0cee..398e99ae0 100644 --- a/src/common/net/Job.h +++ b/src/common/net/Job.h @@ -105,7 +105,7 @@ private: xmrig::Id m_id; # ifdef XMRIG_PROXY_PROJECT - char m_rawBlob[176]; + char m_rawBlob[kMaxBlobSize * 2 + 8]; char m_rawTarget[24]; # endif }; diff --git a/src/common/net/Pool.cpp b/src/common/net/Pool.cpp index a44f8a41f..7e8fa1dc1 100644 --- a/src/common/net/Pool.cpp +++ b/src/common/net/Pool.cpp @@ -5,7 +5,7 @@ * Copyright 2014-2016 Wolf9466 * Copyright 2016 Jay D Dee * Copyright 2017-2018 XMR-Stak , - * Copyright 2018 SChernykh + * Copyright 2018-2019 SChernykh * Copyright 2016-2019 XMRig , * * This program is free software: you can redistribute it and/or modify @@ -106,8 +106,8 @@ bool Pool::isCompatible(const xmrig::Algorithm &algorithm) const } # ifdef XMRIG_PROXY_PROJECT - if (m_algorithm.algo() == xmrig::CRYPTONIGHT && algorithm.algo() == xmrig::CRYPTONIGHT && m_algorithm.variant() == xmrig::VARIANT_XTL) { - return true; + if (m_algorithm.algo() == xmrig::CRYPTONIGHT && algorithm.algo() == xmrig::CRYPTONIGHT) { + return m_algorithm.variant() == xmrig::VARIANT_XTL || m_algorithm.variant() == xmrig::VARIANT_MSR; } # endif