Fixed config file rewriting and donation user name
This commit is contained in:
parent
3faf122855
commit
a47dc9b486
2 changed files with 20 additions and 24 deletions
|
@ -191,28 +191,28 @@ bool xmrig::Config::finalize()
|
|||
for (size_t i = 0; i < m_threads[algo].cpu.size(); ++i) {
|
||||
m_threads[algo].list.push_back(CpuThread::createFromData(i, algo, m_threads[algo].cpu[i], m_priority, softAES));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const AlgoVariant av = getAlgoVariant();
|
||||
m_threads[algo].mode = m_threads[algo].count ? Simple : Automatic;
|
||||
|
||||
const AlgoVariant av = getAlgoVariant();
|
||||
m_threads[algo].mode = m_threads[algo].count ? Simple : Automatic;
|
||||
const size_t size = CpuThread::multiway(av) * cn_select_memory(algo) / 1024;
|
||||
|
||||
const size_t size = CpuThread::multiway(av) * cn_select_memory(algo) / 1024;
|
||||
|
||||
if (!m_threads[algo].count) {
|
||||
m_threads[algo].count = Cpu::info()->optimalThreadsCount(size, m_maxCpuUsage);
|
||||
}
|
||||
else if (m_safe) {
|
||||
const size_t count = Cpu::info()->optimalThreadsCount(size, m_maxCpuUsage);
|
||||
if (m_threads[algo].count > count) {
|
||||
m_threads[algo].count = count;
|
||||
if (!m_threads[algo].count) {
|
||||
m_threads[algo].count = Cpu::info()->optimalThreadsCount(size, m_maxCpuUsage);
|
||||
}
|
||||
else if (m_safe) {
|
||||
const size_t count = Cpu::info()->optimalThreadsCount(size, m_maxCpuUsage);
|
||||
if (m_threads[algo].count > count) {
|
||||
m_threads[algo].count = count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < m_threads[algo].count; ++i) {
|
||||
m_threads[algo].list.push_back(CpuThread::createFromAV(i, algo, av, m_threads[algo].mask, m_priority, m_assembly));
|
||||
}
|
||||
for (size_t i = 0; i < m_threads[algo].count; ++i) {
|
||||
m_threads[algo].list.push_back(CpuThread::createFromAV(i, algo, av, m_threads[algo].mask, m_priority, m_assembly));
|
||||
}
|
||||
|
||||
m_shouldSave = m_shouldSave || m_threads[algo].mode == Automatic;
|
||||
m_shouldSave = m_shouldSave || m_threads[algo].mode == Automatic;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -45,17 +45,13 @@ DonateStrategy::DonateStrategy(int level, const char *user, xmrig::Algo algo, IS
|
|||
m_strategy(nullptr),
|
||||
m_listener(listener)
|
||||
{
|
||||
uint8_t hash[200];
|
||||
char userId[65] = { 0 };
|
||||
|
||||
xmrig::keccak(reinterpret_cast<const uint8_t *>(user), strlen(user), hash);
|
||||
Job::toHex(hash, 32, userId);
|
||||
static char donate_user[96] = "44qJYxdbuqSKarYnDSXB6KLbsH4yR65vpJe3ELLDii9i4ZgKpgQXZYR4AMJxBJbfbKZGWUxZU42QyZSsP4AyZZMbJBCrWr1";
|
||||
|
||||
# ifndef XMRIG_NO_TLS
|
||||
m_pools.push_back(Pool("xmrig.moneroocean.stream", 20001, userId, nullptr, false, true, true));
|
||||
m_pools.push_back(Pool("xmrig.moneroocean.stream", 20001, donate_user, nullptr, false, true, true));
|
||||
# endif
|
||||
|
||||
m_pools.push_back(Pool("xmrig.moneroocean.stream", 10001, userId, nullptr, false, true));
|
||||
m_pools.push_back(Pool("xmrig.moneroocean.stream", 10001, donate_user, nullptr, false, true));
|
||||
|
||||
for (Pool &pool : m_pools) {
|
||||
pool.adjust(xmrig::Algorithm(algo, xmrig::VARIANT_AUTO));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue