added --rand-nonce option to try random instead of sequentially increasing nonces

This commit is contained in:
Fusl 2017-07-25 04:58:20 +02:00
parent b6bf6d9bc9
commit 6516517235
7 changed files with 31 additions and 8 deletions

View file

@ -54,7 +54,11 @@ void SingleWorker::start()
}
m_count++;
*m_job.nonce() = ++m_result.nonce;
if (m_job.isRandNonce()) {
*m_job.nonce() = m_result.nonce += rand();
} else {
*m_job.nonce() = ++m_result.nonce;
}
if (CryptoNight::hash(m_job, m_result, m_ctx)) {
Workers::submit(m_result);