Skip to content

Commit

Permalink
Bugfix: Copy share hash to work->hash before doing 4-byte flip requir…
Browse files Browse the repository at this point in the history
…ed by fulltest
  • Loading branch information
luke-jr committed Dec 8, 2012
1 parent bc68b0d commit 006faac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions miner.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 006faac

Please sign in to comment.