Browse Source

Bugfix: Never consider shares to be accepted if the submission response is an error

Luke Dashjr 13 years ago
parent
commit
0cf666fbc5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      miner.c

+ 1 - 1
miner.c

@@ -2317,7 +2317,7 @@ share_result(json_t *val, json_t *res, json_t *err, const struct work *work,
 	struct pool *pool = work->pool;
 	struct cgpu_info *cgpu = thr_info[work->thr_id].cgpu;
 
-	if (json_is_null(res) || json_is_true(res)) {
+	if ((json_is_null(err) || !err) && (json_is_null(res) || json_is_true(res))) {
 		cgpu->accepted++;
 		cgpu->accepted_weighed += work->work_difficulty;
 		total_accepted++;