From 5a869d1c635e26ab1cfda3ec824fb9eed5a75daa Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Sat, 22 Nov 2014 13:42:06 +0100 Subject: [PATCH] stratum: difficulty can be buggy with values close to zero bug seen on windows with xpool.ca (x11) --- util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.cpp b/util.cpp index 87e4a8e..3e3b43a 100644 --- a/util.cpp +++ b/util.cpp @@ -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);