Browse Source

misc: add FIXME for scrypt_test() and scanhash_scrypt().

build-mingw
Noel Maersk 11 years ago
parent
commit
c4c85ca71c
  1. 5
      scrypt.c
  2. 4
      scrypt.h

5
scrypt.c

@ -420,6 +420,7 @@ void scrypt_regenhash(struct work *work) @@ -420,6 +420,7 @@ void scrypt_regenhash(struct work *work)
static const uint32_t diff1targ = 0x0000ffff;
/* Used externally as confirmation of correct OCL code */
/* FIXME: find reference in git blame and see why it was present, remove if obsolete */
/*
int scrypt_test(unsigned char *pdata, const unsigned char *ptarget, uint32_t nonce)
{
@ -430,7 +431,7 @@ int scrypt_test(unsigned char *pdata, const unsigned char *ptarget, uint32_t non @@ -430,7 +431,7 @@ int scrypt_test(unsigned char *pdata, const unsigned char *ptarget, uint32_t non
be32enc_vect(data, (const uint32_t *)pdata, 19);
data[19] = htobe32(nonce);
scratchbuf = (char *)alloca(SCRATCHBUF_SIZE);
scrypt_1024_1_1_256_sp(data, scratchbuf, ohash);
scrypt_n_1_1_256_sp(data, scratchbuf, ohash, (1 << opt_nfactor));
tmp_hash7 = be32toh(ohash[7]);
applog(LOG_DEBUG, "htarget %08lx diff1 %08lx hash %08lx",
@ -469,7 +470,7 @@ bool scanhash_scrypt(struct thr_info *thr, const unsigned char __maybe_unused *p @@ -469,7 +470,7 @@ bool scanhash_scrypt(struct thr_info *thr, const unsigned char __maybe_unused *p
*nonce = ++n;
data[19] = htobe32(n);
scrypt_1024_1_1_256_sp(data, scratchbuf, ostate);
scrypt_n_1_1_256_sp(data, scratchbuf, ostate, (1 << opt_nfactor));
tmp_hash7 = be32toh(ostate[7]);
if (unlikely(tmp_hash7 <= Htarg)) {

4
scrypt.h

@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
#include "miner.h"
extern int scrypt_test(unsigned char *pdata, const unsigned char *ptarget,
uint32_t nonce);
/* extern int scrypt_test(unsigned char *pdata, const unsigned char *ptarget, */
/* uint32_t nonce); */
extern void scrypt_regenhash(struct work *work);
#endif /* SCRYPT_H */

Loading…
Cancel
Save