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:
@@ -378,6 +378,14 @@ bool xmrig::Client::parseJob(const rapidjson::Value ¶ms, 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 ¶ms, 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)) {
|
||||
|
||||
Reference in New Issue
Block a user