Better v1 PoW implementation, added variant option.

This commit is contained in:
XMRig 2018-03-12 22:29:44 +07:00
parent 83e5832bc1
commit aec31c43c0
19 changed files with 236 additions and 116 deletions

View file

@ -27,6 +27,7 @@
#include "net/Job.h"
#include "net/strategies/DonateStrategy.h"
#include "Options.h"
#include "xmrig.h"
extern "C"
@ -48,7 +49,7 @@ DonateStrategy::DonateStrategy(const char *agent, IStrategyListener *listener) :
keccak(reinterpret_cast<const uint8_t *>(user), static_cast<int>(strlen(user)), hash, sizeof(hash));
Job::toHex(hash, 32, userId);
Url *url = new Url("thanks.xmrig.com", Options::i()->algo() == Options::ALGO_CRYPTONIGHT_LITE ? 3333 : 80, userId, nullptr, false, true);
Url *url = new Url("thanks.xmrig.com", Options::i()->algo() == xmrig::ALGO_CRYPTONIGHT_LITE ? 3333 : 80, userId, nullptr, false, true);
m_client = new Client(-1, agent, this);
m_client->setUrl(url);