Fixed broken "coin" setting functionality
This commit is contained in:
parent
5126cc1414
commit
c080d5b962
3 changed files with 19 additions and 7 deletions
|
@ -379,11 +379,16 @@ bool xmrig::Client::parseJob(const rapidjson::Value ¶ms, int *code)
|
|||
}
|
||||
|
||||
const char *algo = Json::getString(params, "algo");
|
||||
const char *blobData = Json::getString(params, "blob");
|
||||
if (algo) {
|
||||
job.setAlgorithm(algo);
|
||||
}
|
||||
else if (m_pool.coin().isValid()) {
|
||||
job.setAlgorithm(m_pool.coin().algorithm(job.blob()[0]));
|
||||
uint8_t blobVersion = 0;
|
||||
if (blobData) {
|
||||
Cvt::fromHex(&blobVersion, 1, blobData, 2);
|
||||
}
|
||||
job.setAlgorithm(m_pool.coin().algorithm(blobVersion));
|
||||
}
|
||||
|
||||
# ifdef XMRIG_FEATURE_HTTP
|
||||
|
@ -399,7 +404,7 @@ bool xmrig::Client::parseJob(const rapidjson::Value ¶ms, int *code)
|
|||
else
|
||||
# endif
|
||||
{
|
||||
if (!job.setBlob(params["blob"].GetString())) {
|
||||
if (!job.setBlob(blobData)) {
|
||||
*code = 4;
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue