1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-24 21:32:47 -05:00

Updated version

This commit is contained in:
MoneroOcean
2019-08-09 08:20:14 -07:00
88 changed files with 7771 additions and 1084 deletions

View File

@@ -335,13 +335,19 @@ bool xmrig::Client::parseJob(const rapidjson::Value &params, int *code)
job.setAlgorithm(algo);
}
job.setSeedHash(Json::getString(params, "seed_hash"));
job.setHeight(Json::getUint64(params, "height"));
if (!verifyAlgorithm(job.algorithm(), algo)) {
*code = 6;
return false;
}
close();
if (job.algorithm().family() == Algorithm::RANDOM_X && !job.setSeedHash(Json::getString(params, "seed_hash"))) {
if (!isQuiet()) {
LOG_ERR("[%s] failed to parse field \"seed_hash\" required by RandomX", url(), algo);
}
*code = 7;
return false;
}
@@ -693,6 +699,9 @@ void xmrig::Client::parseNotification(const char *method, const rapidjson::Value
if (parseJob(params, &code)) {
m_listener->onJobReceived(this, m_job, params);
}
else {
close();
}
return;
}

View File

@@ -174,6 +174,13 @@ void xmrig::Job::copy(const Job &other)
m_target = other.m_target;
m_index = other.m_index;
memcpy(m_blob, other.m_blob, sizeof (m_blob));
memcpy(m_blob, other.m_blob, sizeof(m_blob));
memcpy(m_seedHash, other.m_seedHash, sizeof(m_seedHash));
# ifdef XMRIG_PROXY_PROJECT
m_rawSeedHash = other.m_rawSeedHash;
memcpy(m_rawBlob, other.m_rawBlob, sizeof(m_rawBlob));
memcpy(m_rawTarget, other.m_rawTarget, sizeof(m_rawTarget));
# endif
}