Fix DoubleWorker.

This commit is contained in:
XMRig 2018-04-03 03:01:04 +07:00
parent 903b243308
commit c1bc6acd26

View file

@ -26,7 +26,7 @@
#include <thread>
#include "crypto/CryptoNight.h"
#include "workers/CpuThread.h"
#include "workers/DoubleWorker.h"
#include "workers/Workers.h"
@ -86,7 +86,7 @@ void DoubleWorker::start()
*Job::nonce(m_state->blob) = ++m_state->nonce1;
*Job::nonce(m_state->blob + m_state->job.size()) = ++m_state->nonce2;
CryptoNight::hash(m_state->blob, m_state->job.size(), m_hash, m_ctx, m_state->job.variant());
m_thread->fn(m_state->job.variant())(m_state->blob, m_state->job.size(), m_hash, m_ctx);
if (*reinterpret_cast<uint64_t*>(m_hash + 24) < m_state->job.target()) {
Workers::submit(JobResult(m_state->job.poolId(), m_state->job.id(), m_state->nonce1, m_hash, m_state->job.diff()));