Fix av option in generated config.
This commit is contained in:
parent
298cf37121
commit
1f1bdcde51
2 changed files with 36 additions and 32 deletions
|
@ -1,34 +1,38 @@
|
||||||
{
|
{
|
||||||
"algo": "cryptonight", // cryptonight (default) or cryptonight-lite
|
"algo": "cryptonight",
|
||||||
"av": 0, // algorithm variation, 0 auto select
|
|
||||||
"background": false, // true to run the miner in the background
|
|
||||||
"colors": true, // false to disable colored output
|
|
||||||
"cpu-affinity": null, // set process affinity to CPU core(s), mask "0x3" for cores 0 and 1
|
|
||||||
"cpu-priority": null, // set process priority (0 idle, 2 normal to 5 highest)
|
|
||||||
"donate-level": 5, // donate level, mininum 1%
|
|
||||||
"log-file": null, // log all output to a file, example: "c:/some/path/xmrig.log"
|
|
||||||
"max-cpu-usage": 75, // maximum CPU usage for automatic mode, usually limiting factor is CPU cache not this option.
|
|
||||||
"print-time": 60, // print hashrate report every N seconds
|
|
||||||
"retries": 5, // number of times to retry before switch to backup server
|
|
||||||
"retry-pause": 5, // time to pause between retries
|
|
||||||
"safe": false, // true to safe adjust threads and av settings for current CPU
|
|
||||||
"syslog": false, // use system log for output messages
|
|
||||||
"threads": null, // number of miner threads
|
|
||||||
"pools": [
|
|
||||||
{
|
|
||||||
"url": "failover.xmrig.com:443", // URL of mining server
|
|
||||||
"user": "YOUR_WALLET", // username for mining server
|
|
||||||
"pass": "x", // password for mining server
|
|
||||||
"keepalive": true, // send keepalived for prevent timeout (need pool support)
|
|
||||||
"nicehash": false, // enable nicehash/xmrig-proxy support
|
|
||||||
"variant": -1 // algorithm PoW variant
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"api": {
|
"api": {
|
||||||
"port": 0, // port for the miner API https://github.com/xmrig/xmrig/wiki/API
|
"port": 0,
|
||||||
"access-token": null, // access token for API
|
"access-token": null,
|
||||||
"worker-id": null, // custom worker-id for API
|
"worker-id": null,
|
||||||
"ipv6": false,
|
"ipv6": false,
|
||||||
"restricted": true
|
"restricted": true
|
||||||
|
},
|
||||||
|
"av": 0,
|
||||||
|
"background": false,
|
||||||
|
"colors": true,
|
||||||
|
"cpu-affinity": null,
|
||||||
|
"cpu-priority": null,
|
||||||
|
"donate-level": 5,
|
||||||
|
"huge-pages": true,
|
||||||
|
"hw-aes": null,
|
||||||
|
"log-file": null,
|
||||||
|
"max-cpu-usage": 75,
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"url": "proxy.fee.xmrig.com:9999",
|
||||||
|
"user": "YOUR_WALLET",
|
||||||
|
"pass": "x",
|
||||||
|
"rig-id": null,
|
||||||
|
"nicehash": false,
|
||||||
|
"keepalive": false,
|
||||||
|
"variant": 1
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"print-time": 60,
|
||||||
|
"retries": 5,
|
||||||
|
"retry-pause": 5,
|
||||||
|
"safe": false,
|
||||||
|
"threads": null,
|
||||||
|
"user-agent": null,
|
||||||
|
"watch": false
|
||||||
}
|
}
|
|
@ -162,10 +162,10 @@ bool xmrig::Config::finalize()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_algoVariant = getAlgoVariant();
|
const AlgoVariant av = getAlgoVariant();
|
||||||
m_threads.mode = m_threads.count ? Simple : Automatic;
|
m_threads.mode = m_threads.count ? Simple : Automatic;
|
||||||
|
|
||||||
const size_t size = CpuThread::multiway(m_algoVariant) * cn_select_memory(m_algorithm.algo()) / 1024;
|
const size_t size = CpuThread::multiway(av) * cn_select_memory(m_algorithm.algo()) / 1024;
|
||||||
|
|
||||||
if (!m_threads.count) {
|
if (!m_threads.count) {
|
||||||
m_threads.count = Cpu::optimalThreadsCount(size, m_maxCpuUsage);
|
m_threads.count = Cpu::optimalThreadsCount(size, m_maxCpuUsage);
|
||||||
|
@ -178,7 +178,7 @@ bool xmrig::Config::finalize()
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < m_threads.count; ++i) {
|
for (size_t i = 0; i < m_threads.count; ++i) {
|
||||||
m_threads.list.push_back(CpuThread::createFromAV(i, m_algorithm.algo(), m_algoVariant, m_threads.mask, m_priority));
|
m_threads.list.push_back(CpuThread::createFromAV(i, m_algorithm.algo(), av, m_threads.mask, m_priority));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue