mirror of
https://github.com/xmrig/xmrig.git
synced 2026-01-23 23:02:51 -05:00
Implemented donate for KawPow.
This commit is contained in:
@@ -69,10 +69,16 @@ xmrig::DonateStrategy::DonateStrategy(Controller *controller, IStrategyListener
|
||||
keccak(reinterpret_cast<const uint8_t *>(user.data()), user.size(), hash);
|
||||
Buffer::toHex(hash, 32, m_userId);
|
||||
|
||||
# ifdef XMRIG_FEATURE_TLS
|
||||
m_pools.emplace_back(kDonateHostTls, 443, m_userId, nullptr, 0, true, true);
|
||||
# ifdef XMRIG_ALGO_KAWPOW
|
||||
constexpr Pool::Mode mode = Pool::MODE_AUTO_ETH;
|
||||
# else
|
||||
constexpr Pool::Mode mode = Pool::MODE_POOL;
|
||||
# endif
|
||||
m_pools.emplace_back(kDonateHost, 3333, m_userId, nullptr, 0, true);
|
||||
|
||||
# ifdef XMRIG_FEATURE_TLS
|
||||
m_pools.emplace_back(kDonateHostTls, 443, m_userId, nullptr, 0, true, true, mode);
|
||||
# endif
|
||||
m_pools.emplace_back(kDonateHost, 3333, m_userId, nullptr, 0, true, false, mode);
|
||||
|
||||
if (m_pools.size() > 1) {
|
||||
m_strategy = new FailoverStrategy(m_pools, 10, 2, this, true);
|
||||
@@ -252,7 +258,7 @@ xmrig::IClient *xmrig::DonateStrategy::createProxy()
|
||||
const IClient *client = strategy->client();
|
||||
m_tls = client->hasExtension(IClient::EXT_TLS);
|
||||
|
||||
Pool pool(client->pool().proxy().isValid() ? client->pool().host() : client->ip(), client->pool().port(), m_userId, client->pool().password(), 0, true, client->isTLS());
|
||||
Pool pool(client->pool().proxy().isValid() ? client->pool().host() : client->ip(), client->pool().port(), m_userId, client->pool().password(), 0, true, client->isTLS(), Pool::MODE_POOL);
|
||||
pool.setAlgo(client->pool().algorithm());
|
||||
pool.setProxy(client->pool().proxy());
|
||||
|
||||
@@ -291,10 +297,10 @@ void xmrig::DonateStrategy::setAlgorithms(rapidjson::Document &doc, rapidjson::V
|
||||
}
|
||||
|
||||
|
||||
void xmrig::DonateStrategy::setJob(IClient *client, const Job &job)
|
||||
void xmrig::DonateStrategy::setJob(IClient *client, const Job &job, const rapidjson::Value ¶ms)
|
||||
{
|
||||
if (isActive()) {
|
||||
m_listener->onJob(this, client, job);
|
||||
m_listener->onJob(this, client, job, params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user