1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

Don't make donation work interfere with block change detection allowing donation to work regardless of the block chain we're mining on.

This commit is contained in:
Con Kolivas 2011-09-29 09:46:32 +10:00
parent 9e9d25c7ba
commit ac0d303075

9
main.c
View File

@ -2502,6 +2502,10 @@ static bool stale_work(struct work *work)
if ((now.tv_sec - work->tv_staged.tv_sec) >= opt_scantime)
return true;
/* Don't compare donor work in case it's on a different chain */
if (donor(work->pool))
return ret;
hexstr = bin2hex(work->data, 18);
if (unlikely(!hexstr)) {
applog(LOG_ERR, "submit_work_thread OOM");
@ -2766,6 +2770,11 @@ static void test_work_current(struct work *work, bool longpoll)
struct block *s;
char *hexstr;
/* Allow donation to not set current work, so it will work even if
* mining on a different chain */
if (donor(work->pool))
return;
hexstr = bin2hex(work->data, 18);
if (unlikely(!hexstr)) {
applog(LOG_ERR, "stage_thread OOM");