Browse Source

Merge branch 'bugfix_stratum_newjob' into bfgminer

Luke Dashjr 13 years ago
parent
commit
7cccff070a
2 changed files with 3 additions and 1 deletions
  1. 1 0
      miner.c
  2. 2 1
      util.c

+ 1 - 0
miner.c

@@ -5518,6 +5518,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 */

+ 2 - 1
util.c

@@ -1070,7 +1070,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) {