Browse Source

Merge commit '83bf9f4' into bfgminer

Luke Dashjr 13 years ago
parent
commit
1b807252ff
1 changed files with 2 additions and 4 deletions
  1. 2 4
      miner.c

+ 2 - 4
miner.c

@@ -3850,8 +3850,7 @@ void *miner_thread(void *userdata)
 	struct timeval getwork_start;
 
 	/* Try to cycle approximately 5 times before each log update */
-	const unsigned long def_cycle = opt_log_interval / 5 ? : 1;
-	long cycle;
+	const unsigned long cycle = opt_log_interval / 5 ? : 1;
 	struct timeval tv_start, tv_end, tv_workstart, tv_lastupdate;
 	struct timeval diff, sdiff, wdiff;
 	uint32_t max_nonce = api->can_limit_work ? api->can_limit_work(mythr) : 0xffffffff;
@@ -3890,7 +3889,6 @@ void *miner_thread(void *userdata)
 			break;
 		}
 		requested = false;
-		cycle = (can_roll(work) && should_roll(work)) ? 1 : def_cycle;
 		gettimeofday(&tv_workstart, NULL);
 		work->blk.nonce = 0;
 		cgpu->max_hashes = 0;
@@ -4135,7 +4133,7 @@ static void wait_lpcurrent(struct pool *pool)
 	if (pool->enabled == POOL_REJECTING || pool_strategy == POOL_LOADBALANCE)
 		return;
 
-	while (pool != current_pool()) {
+	while (pool != current_pool() && pool_strategy != POOL_LOADBALANCE) {
 		mutex_lock(&lp_lock);
 		pthread_cond_wait(&lp_cond, &lp_lock);
 		mutex_unlock(&lp_lock);