diff --git a/ccminer.cpp b/ccminer.cpp index 51c2d3f..69baf85 100644 --- a/ccminer.cpp +++ b/ccminer.cpp @@ -600,10 +600,10 @@ static bool submit_upstream_work(CURL *curl, struct work *work) /* discard if a newer bloc was received */ stale_work = work->height && work->height < g_work.height; - if (have_stratum && !stale_work) { + if (have_stratum && !stale_work && opt_algo != ALGO_ZR5) { pthread_mutex_lock(&g_work_lock); if (strlen(work->job_id + 8)) - stale_work = strcmp(work->job_id + 8, g_work.job_id + 8); + stale_work = strncmp(work->job_id + 8, g_work.job_id + 8, 4); pthread_mutex_unlock(&g_work_lock); } @@ -618,7 +618,7 @@ static bool submit_upstream_work(CURL *curl, struct work *work) } } - if (opt_algo == ALGO_ZR5 && !stale_work) { + if (!stale_work && opt_algo == ALGO_ZR5 && !have_stratum) { stale_work = (memcmp(&work->data[1], &g_work.data[1], 68)); } diff --git a/zr5.cu b/zr5.cu index 4196cfb..91532d7 100644 --- a/zr5.cu +++ b/zr5.cu @@ -313,7 +313,7 @@ extern "C" int scanhash_zr5(int thr_id, uint32_t *pdata, const uint32_t *ptarget zr5hash(vhash64, pdata); if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget)) { int res = 1; - uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1); + uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, oldp19, d_hash[thr_id], 1); if (secNonce != 0) { offset = secNonce - oldp19; pok = version | (0x10000UL * h_poks[thr_id][offset]);