diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-01 21:04:12 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-01 21:04:12 +0200 |
commit | 1f40f88a0c031db1bb04fa39a51117263eb27155 (patch) | |
tree | 3eaa2eae47584487366d5b687eb6092b52acd704 /xmrstak/backend/amd | |
parent | c3469484cd9b552d10db0fe37bcb3c9a5ee24faa (diff) | |
download | xmr-stak-1f40f88a0c031db1bb04fa39a51117263eb27155.zip xmr-stak-1f40f88a0c031db1bb04fa39a51117263eb27155.tar.gz |
readd nicehash pool support
use nicehash start nonce in all backends if nicehash is enabled
Diffstat (limited to 'xmrstak/backend/amd')
-rw-r--r-- | xmrstak/backend/amd/minethd.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmrstak/backend/amd/minethd.cpp b/xmrstak/backend/amd/minethd.cpp index 5f36428..84f0055 100644 --- a/xmrstak/backend/amd/minethd.cpp +++ b/xmrstak/backend/amd/minethd.cpp @@ -173,6 +173,7 @@ void minethd::work_main() cn_hash_fun hash_fun = cpu::minethd::func_selector(::jconf::inst()->HaveHardwareAes(), true /*bNoPrefetch*/); globalStates::inst().iConsumeCnt++; + uint32_t* piNonce = (uint32_t*)(oWork.bWorkBlob + 39); while (bQuit == 0) { @@ -189,8 +190,12 @@ void minethd::work_main() continue; } + if(oWork.bNiceHash) + pGpuCtx->Nonce = calc_nicehash_nonce(*piNonce, oWork.iResumeCnt); + else + pGpuCtx->Nonce = calc_start_nonce(oWork.iResumeCnt); + assert(sizeof(job_result::sJobID) == sizeof(pool_job::sJobID)); - pGpuCtx->Nonce = calc_start_nonce(oWork.iResumeCnt); uint32_t target = oWork.iTarget32; XMRSetJob(pGpuCtx, oWork.bWorkBlob, oWork.iWorkSize, target); |