Browse Source

Bugfix: Copy share hash to work->hash before doing 4-byte flip required by fulltest

Luke Dashjr 13 years ago
parent
commit
006faac674
1 changed files with 3 additions and 3 deletions
  1. 3 3
      miner.c

+ 3 - 3
miner.c

@@ -5207,11 +5207,11 @@ enum test_nonce2_result hashtest2(const struct work *work, bool checktarget)
 	if (!checktarget)
 		return TNR_GOOD;
 
-	swap32yes(hash2_32, hash2_32, 32 / 4);
-
 	memcpy((void*)work->hash, hash2, 32);
 
-	if (!fulltest(work->hash, work->target))
+	swap32yes(hash2_32, hash2_32, 32 / 4);
+
+	if (!fulltest(hash2, work->target))
 		return TNR_HIGH;
 
 	return TNR_GOOD;