mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-05 03:24:26 +00:00
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.
This commit is contained in:
parent
1ad671b094
commit
f4d305a9cd
15
cgminer.c
15
cgminer.c
@ -5456,21 +5456,6 @@ static bool hashtest(struct thr_info *thr, struct work *work)
|
|||||||
return false;
|
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);
|
bool test = fulltest(work->hash, work->target);
|
||||||
if (!test) {
|
if (!test) {
|
||||||
applog(LOG_INFO, "Share below target");
|
applog(LOG_INFO, "Share below target");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user