aboutsummaryrefslogtreecommitdiff
path: root/sha256_4way.c
diff options
context:
space:
mode:
Diffstat (limited to 'sha256_4way.c')
-rw-r--r--sha256_4way.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sha256_4way.c b/sha256_4way.c
index 556a07a..fe9642b 100644
--- a/sha256_4way.c
+++ b/sha256_4way.c
@@ -100,6 +100,7 @@ static const unsigned int pSHA256InitState[8] =
unsigned int ScanHash_4WaySSE2(const unsigned char *pmidstate, unsigned char *pdata,
unsigned char *phash1, unsigned char *phash,
+ const unsigned char *ptarget,
uint32_t max_nonce, unsigned long *nHashesDone)
{
unsigned int *nNonce_p = (unsigned int*)(pdata + 12);
@@ -124,11 +125,11 @@ unsigned int ScanHash_4WaySSE2(const unsigned char *pmidstate, unsigned char *pd
for (i = 0; i < 32/4; i++)
((unsigned int*)phash)[i] = thash[i][j];
- print_pow(phash);
-
- *nHashesDone = nonce;
- *nNonce_p = nonce + j;
- return nonce + j;
+ if (fulltest(phash, ptarget)) {
+ *nHashesDone = nonce;
+ *nNonce_p = nonce + j;
+ return nonce + j;
+ }
}
}