Browse Source

Bugfix: Only adjust work_difficulty on retrodiff submissions, so we can still detect them on rejection

Luke Dashjr 10 years ago
parent
commit
3a4db7df6d
1 changed files with 1 additions and 2 deletions
  1. 1 2
      miner.c

+ 1 - 2
miner.c

@@ -10556,8 +10556,7 @@ enum test_nonce2_result _test_nonce2(struct work *work, uint32_t nonce, bool che
 				if (hash_target_check_v(work->hash, pool->next_target))
 				{
 					high_hash = false;
-					memcpy(work->target, pool->next_target, sizeof(work->target));
-					calc_diff(work, 0);
+					work->work_difficulty = target_diff(pool->next_target);
 				}
 			}
 		}