1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-09 08:42:40 -05:00

Merge branch 'master' of https://github.com/esrrhs/xmrig into pr2217

This commit is contained in:
XMRig
2021-03-29 18:16:45 +07:00
3 changed files with 13 additions and 13 deletions

View File

@@ -378,6 +378,14 @@ bool xmrig::Client::parseJob(const rapidjson::Value &params, int *code)
return false;
}
const char *algo = Json::getString(params, "algo");
if (algo) {
job.setAlgorithm(algo);
}
else if (m_pool.coin().isValid()) {
job.setAlgorithm(m_pool.coin().algorithm(job.blob()[0]));
}
# ifdef XMRIG_FEATURE_HTTP
if (m_pool.mode() == Pool::MODE_SELF_SELECT) {
job.setExtraNonce(Json::getString(params, "extra_nonce"));
@@ -402,14 +410,6 @@ bool xmrig::Client::parseJob(const rapidjson::Value &params, int *code)
return false;
}
const char *algo = Json::getString(params, "algo");
if (algo) {
job.setAlgorithm(algo);
}
else if (m_pool.coin().isValid()) {
job.setAlgorithm(m_pool.coin().algorithm(job.blob()[0]));
}
job.setHeight(Json::getUint64(params, "height"));
if (!verifyAlgorithm(job.algorithm(), algo)) {