diff --git a/ccminer.cpp b/ccminer.cpp index 12140140f3..36b2d2c07f 100644 --- a/ccminer.cpp +++ b/ccminer.cpp @@ -1202,6 +1202,7 @@ static void *miner_thread(void *userdata) bool extrajob = false; char s[16]; int rc = 0; + scan_abort_flag = false; memset(&work, 0, sizeof(work)); // prevent work from being used uninitialized @@ -1813,7 +1814,8 @@ static void *longpoll_thread(void *userdata) json_decref(val); goto out; } - if (likely(val)) { + if (likely(val)) + { if (!opt_quiet) applog(LOG_INFO, "LONGPOLL detected new block"); soval = json_object_get(json_object_get(val, "result"), "submitold"); submit_old = soval ? json_is_true(soval) : false; diff --git a/util.cpp b/util.cpp index 0df2715320..68c5b80c6c 100644 --- a/util.cpp +++ b/util.cpp @@ -1208,7 +1208,9 @@ static bool stratum_set_difficulty(struct stratum_ctx *sctx, json_t *params) pthread_mutex_unlock(&sctx->work_lock); /* store for api stats */ - if (diff != global_diff) { + if (diff != global_diff) + { + scan_abort_flag = true; global_diff = diff; applog(LOG_WARNING, "Stratum difficulty set to %g", diff); }