Skip to content

Commit

Permalink
Bugfix: Properly process new stratum jobs through test_work_current, …
Browse files Browse the repository at this point in the history
…even if old shares are still accepted, and copy submit_old flag correctly
  • Loading branch information
luke-jr committed Nov 16, 2012
1 parent 619d33f commit bfac696
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions miner.c
Original file line number Diff line number Diff line change
Expand Up @@ -5217,6 +5217,7 @@ static void *stratum_thread(void *userdata)
* block database */
pool->swork.clean = false;
gen_stratum_work(pool, &work);
++pool->work_restart_id;
if (test_work_current(&work)) {
/* Only accept a work restart if this stratum
* connection is from the current pool */
Expand Down
3 changes: 2 additions & 1 deletion util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,8 @@ static bool parse_notify(struct pool *pool, json_t *val)
pool->swork.bbversion = bbversion;
pool->swork.nbit = nbit;
pool->swork.ntime = ntime;
pool->swork.clean = clean;
pool->submit_old = !clean;
pool->swork.clean = true;
for (i = 0; i < pool->swork.merkles; i++)
free(pool->swork.merkle[i]);
if (merkles) {
Expand Down

0 comments on commit bfac696

Please sign in to comment.