Merge xmrig v6.14.0 into master

This commit is contained in:
MoneroOcean 2022-02-04 15:35:26 +00:00
commit 72abe1174a
14 changed files with 96 additions and 19 deletions

View file

@ -66,6 +66,12 @@ bool xmrig::AutoClient::parseLogin(const rapidjson::Value &result, int *code)
m_mode = ETH_MODE;
setAlgo(algo);
# ifdef XMRIG_ALGO_GHOSTRIDER
if (algo.family() == Algorithm::GHOSTRIDER) {
setExtraNonce2Size(Json::getUint64(result, "extra_nonce2_size"));
}
# endif
return true;
}

View file

@ -47,6 +47,10 @@ protected:
void setExtraNonce(const rapidjson::Value &nonce);
# ifdef XMRIG_ALGO_GHOSTRIDER
inline void setExtraNonce2Size(uint64_t size) { m_extraNonce2Size = size; }
# endif
private:
static const char *errorMessage(const rapidjson::Value &error);

View file

@ -30,6 +30,7 @@
#include "base/net/stratum/Job.h"
#include "base/tools/Alignment.h"
#include "base/tools/Buffer.h"
#include "base/tools/Cvt.h"
#include "base/tools/cryptonote/BlockTemplate.h"
@ -73,7 +74,7 @@ bool xmrig::Job::setBlob(const char *blob)
return false;
}
if (*nonce() != 0 && !m_nicehash) {
if (readUnaligned(nonce()) != 0 && !m_nicehash) {
m_nicehash = true;
}