New style function selector.
This commit is contained in:
parent
72cd6d168e
commit
903b243308
12 changed files with 287 additions and 31 deletions
|
@ -26,7 +26,7 @@
|
|||
#include <thread>
|
||||
|
||||
|
||||
#include "crypto/CryptoNight.h"
|
||||
#include "workers/CpuThread.h"
|
||||
#include "workers/SingleWorker.h"
|
||||
#include "workers/Workers.h"
|
||||
|
||||
|
@ -61,7 +61,8 @@ void SingleWorker::start()
|
|||
m_count++;
|
||||
*m_job.nonce() = ++m_result.nonce;
|
||||
|
||||
if (CryptoNight::hash(m_job, m_result, m_ctx)) {
|
||||
m_thread->fn(m_job.variant())(m_job.blob(), m_job.size(), m_result.result, m_ctx);
|
||||
if (*reinterpret_cast<uint64_t*>(m_result.result + 24) < m_job.target()) {
|
||||
Workers::submit(m_result);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue