Merge xmrig v6.16.1 into master
This commit is contained in:
commit
ecdb1929e2
121 changed files with 1944 additions and 1118 deletions
|
@ -213,12 +213,13 @@ void xmrig::EthStratumClient::parseNotification(const char *method, const rapidj
|
|||
return;
|
||||
}
|
||||
|
||||
if (!arr[0].IsDouble()) {
|
||||
if (!arr[0].IsDouble() && !arr[0].IsUint64()) {
|
||||
LOG_ERR("%s " RED("invalid mining.set_difficulty notification: difficulty is not a number"), tag());
|
||||
return;
|
||||
}
|
||||
|
||||
m_nextDifficulty = static_cast<uint64_t>(ceil(arr[0].GetDouble() * 65536.0));
|
||||
const double diff = arr[0].IsDouble() ? arr[0].GetDouble() : arr[0].GetUint64();
|
||||
m_nextDifficulty = static_cast<uint64_t>(ceil(diff * 65536.0));
|
||||
}
|
||||
# endif
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "base/kernel/Platform.h"
|
||||
#include "base/net/stratum/Client.h"
|
||||
|
||||
#ifdef XMRIG_ALGO_KAWPOW
|
||||
#if defined XMRIG_ALGO_KAWPOW || defined XMRIG_ALGO_GHOSTRIDER
|
||||
# include "base/net/stratum/AutoClient.h"
|
||||
# include "base/net/stratum/EthStratumClient.h"
|
||||
#endif
|
||||
|
@ -218,7 +218,7 @@ xmrig::IClient *xmrig::Pool::createClient(int id, IClientListener *listener) con
|
|||
IClient *client = nullptr;
|
||||
|
||||
if (m_mode == MODE_POOL) {
|
||||
# ifdef XMRIG_ALGO_KAWPOW
|
||||
# if defined XMRIG_ALGO_KAWPOW || defined XMRIG_ALGO_GHOSTRIDER
|
||||
const uint32_t f = m_algorithm.family();
|
||||
if ((f == Algorithm::KAWPOW) || (f == Algorithm::GHOSTRIDER) || (m_coin == Coin::RAVEN)) {
|
||||
client = new EthStratumClient(id, Platform::userAgent(), listener);
|
||||
|
@ -237,7 +237,7 @@ xmrig::IClient *xmrig::Pool::createClient(int id, IClientListener *listener) con
|
|||
client = new SelfSelectClient(id, Platform::userAgent(), listener, m_submitToOrigin);
|
||||
}
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_KAWPOW
|
||||
# if defined XMRIG_ALGO_KAWPOW || defined XMRIG_ALGO_GHOSTRIDER
|
||||
else if (m_mode == MODE_AUTO_ETH) {
|
||||
client = new AutoClient(id, Platform::userAgent(), listener);
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ uint32_t xmrig::Pools::benchSize() const
|
|||
return m_benchmark ? m_benchmark->size() : 0;
|
||||
# else
|
||||
return 0;
|
||||
# endif
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ void xmrig::SelfSelectClient::submitOriginDaemon(const JobResult& result)
|
|||
if (result.diff == 0 || m_blockDiff == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (result.actualDiff() < m_blockDiff) {
|
||||
m_originNotSubmitted++;
|
||||
LOG_DEBUG("%s " RED_BOLD("not submitted to origin daemon, difficulty too low") " (%" PRId64 "/%" PRId64 ") "
|
||||
|
@ -287,9 +287,9 @@ void xmrig::SelfSelectClient::submitOriginDaemon(const JobResult& result)
|
|||
|
||||
FetchRequest req(HTTP_POST, pool().daemon().host(), pool().daemon().port(), "/json_rpc", doc, pool().daemon().isTLS(), isQuiet());
|
||||
fetch(tag(), std::move(req), m_httpListener);
|
||||
|
||||
|
||||
m_originSubmitted++;
|
||||
LOG_INFO("%s " GREEN_BOLD("submitted to origin daemon") " (%" PRId64 "/%" PRId64 ") "
|
||||
LOG_INFO("%s " GREEN_BOLD("submitted to origin daemon") " (%" PRId64 "/%" PRId64 ") "
|
||||
" diff " WHITE("%" PRIu64) " vs. " WHITE("%" PRIu64),
|
||||
Tags::origin(), m_originSubmitted, m_originNotSubmitted, m_blockDiff, result.actualDiff(), result.diff);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue