Fix nonce allocation in DoubleWorker.

This commit is contained in:
XMRig
2018-04-03 03:27:44 +07:00
parent 22ba62e73d
commit 69661094ca
9 changed files with 14 additions and 9 deletions

View File

@@ -135,11 +135,11 @@ void DoubleWorker::consumeJob()
if (m_state->job.isNicehash()) {
m_state->nonce1 = (*Job::nonce(m_state->blob) & 0xff000000U) + (0xffffffU / m_totalWays * m_id);
m_state->nonce2 = (*Job::nonce(m_state->blob + m_state->job.size()) & 0xff000000U) + (0xffffffU / m_totalWays * (m_id + m_totalWays));
m_state->nonce2 = (*Job::nonce(m_state->blob + m_state->job.size()) & 0xff000000U) + (0xffffffU / m_totalWays * (m_id + m_totalThreads));
}
else {
m_state->nonce1 = 0xffffffffU / m_totalWays * m_id;
m_state->nonce2 = 0xffffffffU / m_totalWays * (m_id + m_totalWays);
m_state->nonce2 = 0xffffffffU / m_totalWays * (m_id + m_totalThreads);
}
}