Changes for the Monero v1 PoW

This commit is contained in:
Lee Clagett
2018-03-02 22:10:46 -05:00
parent 3ebff4137c
commit 6f4fbb3c40
6 changed files with 128 additions and 52 deletions

View File

@@ -52,6 +52,8 @@ void SingleWorker::start()
consumeJob();
}
const uint8_t version = m_job.size() ? m_job.blob()[0] : 0;
while (!Workers::isOutdated(m_sequence)) {
if ((m_count & 0xF) == 0) {
storeStats();
@@ -60,7 +62,7 @@ void SingleWorker::start()
m_count++;
*m_job.nonce() = ++m_result.nonce;
if (CryptoNight::hash(m_job, m_result, m_ctx)) {
if (CryptoNight::hash(m_job, m_result, m_ctx, version)) {
Workers::submit(m_result);
}