Browse Source

Revert "Merge commit 'd5dffa6' into bfgminer"

This reverts commit 977204150fa3ec2cc9aac2cd222b752cb4f844aa, reversing
changes made to 43541e8a2975204237b2d412d414525751288f8b.
Luke Dashjr 13 years ago
parent
commit
8045fca3f4
1 changed files with 4 additions and 2 deletions
  1. 4 2
      miner.c

+ 4 - 2
miner.c

@@ -2436,6 +2436,9 @@ static bool stale_work(struct work *work, bool share)
 	uint32_t block_id;
 	int getwork_delay;
 
+	if (work->mandatory)
+		return false;
+
 	block_id = ((uint32_t*)work->data)[1];
 	pool = work->pool;
 
@@ -2501,7 +2504,7 @@ static bool stale_work(struct work *work, bool share)
 
 	/* If the user only wants strict failover, any work from a pool other than
 	 * the current one is always considered stale */
-	if (opt_fail_only && !share && pool != current_pool() && !work->mandatory) {
+	if (opt_fail_only && !share && pool != current_pool() && pool->enabled != POOL_REJECTING) {
 		applog(LOG_DEBUG, "Work stale due to fail only pool mismatch");
 		return true;
 	}
@@ -4150,7 +4153,6 @@ static struct work *make_clone(struct work *work)
 	memcpy(work_clone, work, sizeof(struct work));
 	work_clone->clone = true;
 	work_clone->longpoll = false;
-	work_clone->mandatory = false;
 	/* Make cloned work appear slightly older to bias towards keeping the
 	 * master work item which can be further rolled */
 	work_clone->tv_staged.tv_sec -= 1;