Browse Source

Merge commit '0eb81d6' into update_avalon_20130524

Luke Dashjr 13 years ago
parent
commit
4bfef74a80
1 changed files with 3 additions and 0 deletions
  1. 3 0
      driver-avalon.c

+ 3 - 0
driver-avalon.c

@@ -903,6 +903,9 @@ static int64_t avalon_scanhash(struct thr_info *thr)
 			info->no_matching_work++;
 			info->no_matching_work++;
 			result_wrong++;
 			result_wrong++;
 
 
+			if (result_wrong >= avalon_get_work_count)
+				break;
+
 			if (opt_debug) {
 			if (opt_debug) {
 				timersub(&tv_finish, &tv_start, &elapsed);
 				timersub(&tv_finish, &tv_start, &elapsed);
 				applog(LOG_DEBUG,"Avalon: no matching work: %d"
 				applog(LOG_DEBUG,"Avalon: no matching work: %d"