diff options
author | Jeff Garzik <jeff@garzik.org> | 2011-01-29 00:56:24 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2011-01-29 00:56:24 -0500 |
commit | 0b677407076a55c6a758d1414fade617abd552e5 (patch) | |
tree | 193288f726bf0d89579deefe7d787088d2e8cf6f /cpu-miner.c | |
parent | f570ffcf75764398c9682c310ad7420acd7593c2 (diff) |
Pass max-nonce as arg to each sha256 algo.
Should be an equivalent transformation, with no behavior changes.
Diffstat (limited to 'cpu-miner.c')
-rw-r--r-- | cpu-miner.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/cpu-miner.c b/cpu-miner.c index dc611ad..8895d50 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -301,7 +301,8 @@ static void *miner_thread(void *thr_id_int) switch (opt_algo) { case ALGO_C: rc = scanhash_c(work.midstate, work.data + 64, - work.hash1, work.hash, &hashes_done); + work.hash1, work.hash, + 0xffffff, &hashes_done); break; #ifdef WANT_SSE2_4WAY @@ -309,7 +310,7 @@ static void *miner_thread(void *thr_id_int) unsigned int rc4 = ScanHash_4WaySSE2(work.midstate, work.data + 64, work.hash1, work.hash, - &hashes_done); + 0xffffff, &hashes_done); rc = (rc4 == -1) ? false : true; } break; @@ -317,18 +318,20 @@ static void *miner_thread(void *thr_id_int) #ifdef WANT_VIA_PADLOCK case ALGO_VIA: - rc = scanhash_via(work.data, &hashes_done); + rc = scanhash_via(work.data, 0xffffff, &hashes_done); break; #endif case ALGO_CRYPTOPP: rc = scanhash_cryptopp(work.midstate, work.data + 64, - work.hash1, work.hash, &hashes_done); + work.hash1, work.hash, + 0xffffff, &hashes_done); break; #ifdef WANT_CRYPTOPP_ASM32 case ALGO_CRYPTOPP_ASM32: rc = scanhash_asm32(work.midstate, work.data + 64, - work.hash1, work.hash, &hashes_done); + work.hash1, work.hash, + 0xffffff, &hashes_done); break; #endif |