Browse Source

Bugfix: Don't consider work stale due to other pools' longpolls, if --failover-only is active

Otherwise, we idle and continue to hammer the current pool for new work until it has caught up
Luke Dashjr 13 years ago
parent
commit
f401e76d71
1 changed files with 2 additions and 1 deletions
  1. 2 1
      cgminer.c

+ 2 - 1
cgminer.c

@@ -2189,7 +2189,8 @@ static bool stale_work(struct work *work, bool share)
 			work_expiry = opt_expiry;
 	} else {
 		/* If this work isn't for the latest Bitcoin block, it's stale */
-		if (current_block_id != block_id)
+		/* But only care about the current pool if failover-only */
+		if (block_id != (opt_fail_only ? pool->block_id : current_block_id))
 			return true;
 
 		/* If the pool has asked us to restart since this work, it's stale */