diff --git a/src/base/net/stratum/AutoClient.cpp b/src/base/net/stratum/AutoClient.cpp index 51e47eeed..675be865a 100644 --- a/src/base/net/stratum/AutoClient.cpp +++ b/src/base/net/stratum/AutoClient.cpp @@ -19,7 +19,6 @@ #include "base/net/stratum/AutoClient.h" #include "3rdparty/rapidjson/document.h" #include "base/io/json/Json.h" -#include "net/JobResult.h" xmrig::AutoClient::AutoClient(int id, const char *agent, IClientListener *listener) : @@ -78,7 +77,7 @@ bool xmrig::AutoClient::parseLogin(const rapidjson::Value &result, int *code) int64_t xmrig::AutoClient::submit(const JobResult &result) { - if (result.algorithm.family() != Algorithm::KAWPOW || result.algorithm.family() != Algorithm::GHOSTRIDER) { + if (m_mode == DEFAULT_MODE) { return Client::submit(result); // NOLINT(bugprone-parent-virtual-call) } @@ -88,11 +87,9 @@ int64_t xmrig::AutoClient::submit(const JobResult &result) void xmrig::AutoClient::parseNotification(const char *method, const rapidjson::Value ¶ms, const rapidjson::Value &error) { - if (strcmp(method, "job") == 0) { - m_mode = DEFAULT_MODE; + if (m_mode == DEFAULT_MODE) { return Client::parseNotification(method, params, error); // NOLINT(bugprone-parent-virtual-call) } - m_mode = ETH_MODE; return EthStratumClient::parseNotification(method, params, error); }