mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-23 20:19:23 +00:00
#62 Don't send the login to the dev pool.
This commit is contained in:
parent
b5897b336a
commit
e3e52f6d06
1 changed files with 15 additions and 1 deletions
|
@ -24,17 +24,31 @@
|
||||||
|
|
||||||
#include "interfaces/IStrategyListener.h"
|
#include "interfaces/IStrategyListener.h"
|
||||||
#include "net/Client.h"
|
#include "net/Client.h"
|
||||||
|
#include "net/Job.h"
|
||||||
#include "net/strategies/DonateStrategy.h"
|
#include "net/strategies/DonateStrategy.h"
|
||||||
#include "Options.h"
|
#include "Options.h"
|
||||||
|
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#include "crypto/c_keccak.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DonateStrategy::DonateStrategy(const char *agent, IStrategyListener *listener) :
|
DonateStrategy::DonateStrategy(const char *agent, IStrategyListener *listener) :
|
||||||
m_active(false),
|
m_active(false),
|
||||||
m_donateTime(Options::i()->donateLevel() * 60 * 1000),
|
m_donateTime(Options::i()->donateLevel() * 60 * 1000),
|
||||||
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("fee.xmrig.com", Options::i()->algo() == Options::ALGO_CRYPTONIGHT_LITE ? 3333 : 443, Options::i()->pools().front()->user(), nullptr, false, true);
|
uint8_t hash[200];
|
||||||
|
char userId[65] = { 0 };
|
||||||
|
const char *user = Options::i()->pools().front()->user();
|
||||||
|
|
||||||
|
keccak(reinterpret_cast<const uint8_t *>(user), static_cast<int>(strlen(user)), hash, sizeof(hash));
|
||||||
|
Job::toHex(hash, 32, userId);
|
||||||
|
|
||||||
|
Url *url = new Url("fee.xmrig.com", Options::i()->algo() == Options::ALGO_CRYPTONIGHT_LITE ? 3333 : 443, userId, nullptr, false, true);
|
||||||
|
|
||||||
m_client = new Client(-1, agent, this);
|
m_client = new Client(-1, agent, this);
|
||||||
m_client->setUrl(url);
|
m_client->setUrl(url);
|
||||||
|
|
Loading…
Reference in a new issue