From 14117e965840d6549fe31738c1fdedc5b898cdee Mon Sep 17 00:00:00 2001 From: XMRig Date: Mon, 31 Jan 2022 14:29:41 +0700 Subject: [PATCH] #2910 Fixed donation for GhostRider/RTM. --- src/base/net/stratum/AutoClient.cpp | 6 ++++++ src/base/net/stratum/EthStratumClient.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/base/net/stratum/AutoClient.cpp b/src/base/net/stratum/AutoClient.cpp index 702c0fa04..675be865a 100644 --- a/src/base/net/stratum/AutoClient.cpp +++ b/src/base/net/stratum/AutoClient.cpp @@ -65,6 +65,12 @@ bool xmrig::AutoClient::parseLogin(const rapidjson::Value &result, int *code) m_mode = ETH_MODE; setAlgo(algo); +# ifdef XMRIG_ALGO_GHOSTRIDER + if (algo.family() == Algorithm::GHOSTRIDER) { + setExtraNonce2Size(Json::getUint64(result, "extra_nonce2_size")); + } +# endif + return true; } diff --git a/src/base/net/stratum/EthStratumClient.h b/src/base/net/stratum/EthStratumClient.h index c1fde9b62..ebfda6ac3 100644 --- a/src/base/net/stratum/EthStratumClient.h +++ b/src/base/net/stratum/EthStratumClient.h @@ -47,6 +47,10 @@ protected: void setExtraNonce(const rapidjson::Value &nonce); +# ifdef XMRIG_ALGO_GHOSTRIDER + inline void setExtraNonce2Size(uint64_t size) { m_extraNonce2Size = size; } +# endif + private: static const char *errorMessage(const rapidjson::Value &error);