The specification for stratum has been elaborated to say that a changed diff applies only to new work so do not retarget when submitting shares.
diff --git a/cgminer.c b/cgminer.c
index 78378bf..b5ffc79 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -5378,21 +5378,6 @@ static bool hashtest(struct thr_info *thr, struct work *work)
return false;
}
- if (work->stratum) {
- double diff;
-
- mutex_lock(&pool->pool_lock);
- diff = pool->swork.diff;
- mutex_unlock(&pool->pool_lock);
-
- /* Retarget share only if pool diff has dropped since we
- * generated this work */
- if (unlikely(work->sdiff > diff)) {
- applog(LOG_DEBUG, "Share needs retargetting to match pool");
- set_work_target(work, diff);
- }
- }
-
bool test = fulltest(work->hash, work->target);
if (!test) {
applog(LOG_INFO, "Share below target");