mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-12 13:55:19 +00:00
Merge branch 'master' into dev
This commit is contained in:
commit
a66297bed8
4 changed files with 14 additions and 5 deletions
|
@ -52,12 +52,13 @@ Client::Client(int id, const char *agent, IClientListener *listener) :
|
||||||
m_socket(nullptr)
|
m_socket(nullptr)
|
||||||
{
|
{
|
||||||
memset(m_ip, 0, sizeof(m_ip));
|
memset(m_ip, 0, sizeof(m_ip));
|
||||||
|
memset(&m_hints, 0, sizeof(m_hints));
|
||||||
|
|
||||||
m_resolver.data = m_responseTimer.data = m_retriesTimer.data = m_keepAliveTimer.data = this;
|
m_resolver.data = m_responseTimer.data = m_retriesTimer.data = m_keepAliveTimer.data = this;
|
||||||
|
|
||||||
m_hints.ai_family = PF_INET;
|
m_hints.ai_family = PF_INET;
|
||||||
m_hints.ai_socktype = SOCK_STREAM;
|
m_hints.ai_socktype = SOCK_STREAM;
|
||||||
m_hints.ai_protocol = IPPROTO_TCP;
|
m_hints.ai_protocol = IPPROTO_TCP;
|
||||||
m_hints.ai_flags = 0;
|
|
||||||
|
|
||||||
m_recvBuf.base = static_cast<char*>(malloc(kRecvBufSize));
|
m_recvBuf.base = static_cast<char*>(malloc(kRecvBufSize));
|
||||||
m_recvBuf.len = kRecvBufSize;
|
m_recvBuf.len = kRecvBufSize;
|
||||||
|
|
|
@ -82,7 +82,15 @@ bool Job::setBlob(const char *blob)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return fromHex(blob, m_size * 2, m_blob);
|
if (!fromHex(blob, m_size * 2, m_blob)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*nonce() != 0 && !m_nicehash) {
|
||||||
|
m_nicehash = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ DonateStrategy::DonateStrategy(const char *agent, IStrategyListener *listener) :
|
||||||
m_idleTime((100 - Options::i()->donateLevel()) * 60 * 1000),
|
m_idleTime((100 - Options::i()->donateLevel()) * 60 * 1000),
|
||||||
m_listener(listener)
|
m_listener(listener)
|
||||||
{
|
{
|
||||||
Url *url = new Url("donate.xmrig.com", Options::i()->algo() == Options::ALGO_CRYPTONIGHT_LITE ? 3333 : 443, Options::i()->pools().front()->user());
|
Url *url = new Url("donate2.xmrig.com", Options::i()->algo() == Options::ALGO_CRYPTONIGHT_LITE ? 3333 : 443, Options::i()->pools().front()->user());
|
||||||
|
|
||||||
m_client = new Client(-1, agent, this);
|
m_client = new Client(-1, agent, this);
|
||||||
m_client->setUrl(url);
|
m_client->setUrl(url);
|
||||||
|
|
|
@ -27,14 +27,14 @@
|
||||||
#define APP_ID "xmrig"
|
#define APP_ID "xmrig"
|
||||||
#define APP_NAME "XMRig"
|
#define APP_NAME "XMRig"
|
||||||
#define APP_DESC "Monero (XMR) CPU miner"
|
#define APP_DESC "Monero (XMR) CPU miner"
|
||||||
#define APP_VERSION "2.0.0"
|
#define APP_VERSION "2.0.1"
|
||||||
#define APP_DOMAIN "xmrig.com"
|
#define APP_DOMAIN "xmrig.com"
|
||||||
#define APP_SITE "www.xmrig.com"
|
#define APP_SITE "www.xmrig.com"
|
||||||
#define APP_COPYRIGHT "Copyright (C) 2016-2017 xmrig.com"
|
#define APP_COPYRIGHT "Copyright (C) 2016-2017 xmrig.com"
|
||||||
|
|
||||||
#define APP_VER_MAJOR 2
|
#define APP_VER_MAJOR 2
|
||||||
#define APP_VER_MINOR 0
|
#define APP_VER_MINOR 0
|
||||||
#define APP_VER_BUILD 0
|
#define APP_VER_BUILD 1
|
||||||
#define APP_VER_REV 0
|
#define APP_VER_REV 0
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
Loading…
Reference in a new issue