aboutsummaryrefslogtreecommitdiff
path: root/sha256_cryptopp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sha256_cryptopp.c')
-rw-r--r--sha256_cryptopp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sha256_cryptopp.c b/sha256_cryptopp.c
index 4ada480..47d4921 100644
--- a/sha256_cryptopp.c
+++ b/sha256_cryptopp.c
@@ -93,6 +93,7 @@ static void runhash(void *state, const void *input, const void *init)
/* suspiciously similar to ScanHash* from bitcoin */
bool scanhash_cryptopp(const unsigned char *midstate, unsigned char *data,
unsigned char *hash1, unsigned char *hash,
+ const unsigned char *target,
uint32_t max_nonce, unsigned long *hashes_done)
{
uint32_t *hash32 = (uint32_t *) hash;
@@ -109,9 +110,7 @@ bool scanhash_cryptopp(const unsigned char *midstate, unsigned char *data,
stat_ctr++;
- if (hash32[7] == 0) {
- print_pow(hash);
-
+ if ((hash32[7] == 0) && fulltest(hash, target)) {
*hashes_done = stat_ctr;
return true;
}
@@ -578,6 +577,7 @@ static void runhash32(void *state, const void *input, const void *init)
/* suspiciously similar to ScanHash* from bitcoin */
bool scanhash_asm32(const unsigned char *midstate, unsigned char *data,
unsigned char *hash1, unsigned char *hash,
+ const unsigned char *target,
uint32_t max_nonce, unsigned long *hashes_done)
{
uint32_t *hash32 = (uint32_t *) hash;
@@ -594,8 +594,8 @@ bool scanhash_asm32(const unsigned char *midstate, unsigned char *data,
stat_ctr++;
- if (hash32[7] == 0) {
- print_pow(hash);
+ if ((hash32[7] == 0) && fulltest(hash, target)) {
+ fulltest(hash, target);
*hashes_done = stat_ctr;
return true;