Browse Source

Stratum: If difficulty calculates out to 0.999 to 1, round it up to 1 to avoid something SHA2 hardware cannot handle

Luke Dashjr 12 years ago
parent
commit
08cbf80f48
1 changed files with 3 additions and 0 deletions
  1. 3 0
      util.c

+ 3 - 0
util.c

@@ -2013,6 +2013,9 @@ static bool parse_diff(struct pool *pool, json_t *val)
 		}
 	}
 	
+	if ((!opt_scrypt) && diff < 1 && diff > 0.999)
+		diff = 1;
+	
 	cg_wlock(&pool->data_lock);
 	set_target_to_pdiff(pool->swork.target, diff);
 	cg_wunlock(&pool->data_lock);