From c4c85ca71c4251311aeab93e4fdcec71c62d06b4 Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Tue, 25 Feb 2014 06:32:06 +0200 Subject: [PATCH] misc: add FIXME for scrypt_test() and scanhash_scrypt(). --- scrypt.c | 5 +++-- scrypt.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scrypt.c b/scrypt.c index 506b7daf..3b2e74de 100644 --- a/scrypt.c +++ b/scrypt.c @@ -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 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 *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)) { diff --git a/scrypt.h b/scrypt.h index b08edfaf..d967f541 100644 --- a/scrypt.h +++ b/scrypt.h @@ -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 */