Sync changes with proxy.
This commit is contained in:
parent
b9fec2fcc4
commit
ca149d2eed
22 changed files with 436 additions and 328 deletions
|
@ -61,7 +61,7 @@ Network::Network(xmrig::Controller *controller) :
|
|||
}
|
||||
|
||||
if (controller->config()->donateLevel() > 0) {
|
||||
m_donate = new DonateStrategy(controller->config()->donateLevel(), controller->config()->pools().front().user(), controller->config()->algorithm(), this);
|
||||
m_donate = new DonateStrategy(controller->config()->donateLevel(), controller->config()->pools().front().user(), controller->config()->algorithm().algo(), this);
|
||||
}
|
||||
|
||||
m_timer.data = this;
|
||||
|
@ -166,9 +166,9 @@ bool Network::isColors() const
|
|||
|
||||
void Network::setJob(Client *client, const Job &job, bool donate)
|
||||
{
|
||||
LOG_INFO(isColors() ? MAGENTA_BOLD("new job") " from " WHITE_BOLD("%s:%d") " diff " WHITE_BOLD("%d") " algo " WHITE_BOLD("%s/%d")
|
||||
: "new job from %s:%d diff %d algo %s/%d",
|
||||
client->host(), client->port(), job.diff(), Pool::algoName(job.algorithm(), true), static_cast<int>(job.variant()));
|
||||
LOG_INFO(isColors() ? MAGENTA_BOLD("new job") " from " WHITE_BOLD("%s:%d") " diff " WHITE_BOLD("%d") " algo " WHITE_BOLD("%s")
|
||||
: "new job from %s:%d diff %d algo %s",
|
||||
client->host(), client->port(), job.diff(), job.algorithm().shortName());
|
||||
|
||||
m_state.diff = job.diff();
|
||||
Workers::setJob(job, donate);
|
||||
|
|
|
@ -63,15 +63,12 @@ DonateStrategy::DonateStrategy(int level, const char *user, xmrig::Algo algo, IS
|
|||
else if (algo == xmrig::CRYPTONIGHT_HEAVY) {
|
||||
m_pools.push_back(Pool(kDonatePool1, 8888, userId, nullptr, false, true));
|
||||
}
|
||||
else if (algo == xmrig::CRYPTONIGHT_IPBC) {
|
||||
m_pools.push_back(Pool(kDonatePool1, 13333, userId, nullptr, false, true));
|
||||
}
|
||||
else {
|
||||
m_pools.push_back(Pool(kDonatePool1, 5555, userId, nullptr, false, true));
|
||||
}
|
||||
|
||||
for (Pool &pool : m_pools) {
|
||||
pool.setAlgo(algo);
|
||||
pool.algorithm().setAlgo(algo);
|
||||
}
|
||||
|
||||
if (m_pools.size() > 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue