mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-24 04:29:25 +00:00
Fix DoubleWorker.
This commit is contained in:
parent
903b243308
commit
c1bc6acd26
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
|
||||||
#include "crypto/CryptoNight.h"
|
#include "workers/CpuThread.h"
|
||||||
#include "workers/DoubleWorker.h"
|
#include "workers/DoubleWorker.h"
|
||||||
#include "workers/Workers.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->nonce1;
|
||||||
*Job::nonce(m_state->blob + m_state->job.size()) = ++m_state->nonce2;
|
*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()) {
|
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()));
|
Workers::submit(JobResult(m_state->job.poolId(), m_state->job.id(), m_state->nonce1, m_hash, m_state->job.diff()));
|
||||||
|
|
Loading…
Reference in a new issue