|
|
|
@ -600,10 +600,10 @@ static bool submit_upstream_work(CURL *curl, struct work *work)
@@ -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)
@@ -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)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|