stratum: difficulty can be buggy with values close to zero

bug seen on windows with xpool.ca (x11)
This commit is contained in:
Tanguy Pruvot 2014-11-22 13:42:06 +01:00
parent 2ea9da1415
commit 5a869d1c63

View File

@ -1258,7 +1258,7 @@ static bool stratum_set_difficulty(struct stratum_ctx *sctx, json_t *params)
double diff;
diff = json_number_value(json_array_get(params, 0));
if (diff == 0)
if (diff <= 0.0)
return false;
pthread_mutex_lock(&sctx->work_lock);