Skip to content

Commit

Permalink
Remove patches to AutoClient so that KawPow actually submits jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Spudz76 committed Jun 4, 2024
1 parent 2215ab1 commit 6fb5aa2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/base/net/stratum/AutoClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) :
Expand Down Expand Up @@ -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)
}

Expand All @@ -88,11 +87,9 @@ int64_t xmrig::AutoClient::submit(const JobResult &result)

void xmrig::AutoClient::parseNotification(const char *method, const rapidjson::Value &params, 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);
}

0 comments on commit 6fb5aa2

Please sign in to comment.