Browse Source

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.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
f4d305a9cd
  1. 15
      cgminer.c

15
cgminer.c

@ -5456,21 +5456,6 @@ static bool hashtest(struct thr_info *thr, struct work *work) @@ -5456,21 +5456,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");

Loading…
Cancel
Save