Add nice messages for accepted and rejected shares with diff and latency.

This commit is contained in:
XMRig 2017-07-02 05:33:10 +03:00
parent 71522214ae
commit 074db6bb72
17 changed files with 128 additions and 14 deletions

View file

@ -62,11 +62,11 @@ void DoubleWorker::start()
CryptoNight::hash(m_blob, m_job.size(), m_hash, m_ctx);
if (*reinterpret_cast<uint64_t*>(m_hash + 24) < m_job.target()) {
Workers::submit(JobResult(m_job.poolId(), m_job.id(), m_nonce1, m_hash));
Workers::submit(JobResult(m_job.poolId(), m_job.id(), m_nonce1, m_hash, m_job.diff()));
}
if (*reinterpret_cast<uint64_t*>(m_hash + 32 + 24) < m_job.target()) {
Workers::submit(JobResult(m_job.poolId(), m_job.id(), m_nonce2, m_hash + 32));
Workers::submit(JobResult(m_job.poolId(), m_job.id(), m_nonce2, m_hash + 32, m_job.diff()));
}
std::this_thread::yield();

View file

@ -76,6 +76,7 @@ void SingleWorker::consumeJob()
memcpy(m_result.jobId, m_job.id(), sizeof(m_result.jobId));
m_result.poolId = m_job.poolId();
m_result.diff = m_job.diff();
if (m_job.isNicehash()) {
m_result.nonce = (*m_job.nonce() & 0xff000000U) + (0xffffffU / m_threads * m_id);