Skip to content

Commit

Permalink
Unified code with xmrig-amd version
Browse files Browse the repository at this point in the history
  • Loading branch information
MoneroOcean committed Jan 15, 2019
1 parent 189eda6 commit 35a6110
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/common/net/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,10 @@ bool Client::parseJob(const rapidjson::Value &params, int *code)
return false;
}

if (params.HasMember("variant")) {
if (params.HasMember("algo")) {
job.setAlgorithm(params["algo"].GetString());
}
else if (params.HasMember("variant")) {
const rapidjson::Value &variant = params["variant"];

if (variant.IsInt()) {
Expand All @@ -353,11 +356,6 @@ bool Client::parseJob(const rapidjson::Value &params, int *code)
}
}

// moved algo after variant parsing to override variant that is considered to be outdated now
if (params.HasMember("algo")) {
job.setAlgorithm(params["algo"].GetString());
}

if (!verifyAlgorithm(job.algorithm())) {
*code = 6;

Expand Down

0 comments on commit 35a6110

Please sign in to comment.