mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 04:54:26 +00:00
Cryptopp asm32 was not correctly updated to the incremental nonce code so the hash counter was bogus.
This commit is contained in:
parent
a2a60080ff
commit
1480ade278
@ -102,7 +102,6 @@ bool scanhash_cryptopp(int thr_id, const unsigned char *midstate,
|
|||||||
{
|
{
|
||||||
uint32_t *hash32 = (uint32_t *) hash;
|
uint32_t *hash32 = (uint32_t *) hash;
|
||||||
uint32_t *nonce = (uint32_t *)(data + 12);
|
uint32_t *nonce = (uint32_t *)(data + 12);
|
||||||
unsigned long stat_ctr = 0;
|
|
||||||
|
|
||||||
work_restart[thr_id].restart = 0;
|
work_restart[thr_id].restart = 0;
|
||||||
|
|
||||||
@ -113,8 +112,6 @@ bool scanhash_cryptopp(int thr_id, const unsigned char *midstate,
|
|||||||
runhash(hash1, data, midstate);
|
runhash(hash1, data, midstate);
|
||||||
runhash(hash, hash1, sha256_init_state);
|
runhash(hash, hash1, sha256_init_state);
|
||||||
|
|
||||||
stat_ctr++;
|
|
||||||
|
|
||||||
if (unlikely((hash32[7] == 0) && fulltest(hash, target))) {
|
if (unlikely((hash32[7] == 0) && fulltest(hash, target))) {
|
||||||
*hashes_done = n;
|
*hashes_done = n;
|
||||||
return true;
|
return true;
|
||||||
@ -587,7 +584,6 @@ bool scanhash_asm32(int thr_id, const unsigned char *midstate,
|
|||||||
{
|
{
|
||||||
uint32_t *hash32 = (uint32_t *) hash;
|
uint32_t *hash32 = (uint32_t *) hash;
|
||||||
uint32_t *nonce = (uint32_t *)(data + 12);
|
uint32_t *nonce = (uint32_t *)(data + 12);
|
||||||
unsigned long stat_ctr = 0;
|
|
||||||
|
|
||||||
work_restart[thr_id].restart = 0;
|
work_restart[thr_id].restart = 0;
|
||||||
|
|
||||||
@ -598,17 +594,13 @@ bool scanhash_asm32(int thr_id, const unsigned char *midstate,
|
|||||||
runhash32(hash1, data, midstate);
|
runhash32(hash1, data, midstate);
|
||||||
runhash32(hash, hash1, sha256_init_state);
|
runhash32(hash, hash1, sha256_init_state);
|
||||||
|
|
||||||
stat_ctr++;
|
|
||||||
|
|
||||||
if (unlikely((hash32[7] == 0) && fulltest(hash, target))) {
|
if (unlikely((hash32[7] == 0) && fulltest(hash, target))) {
|
||||||
fulltest(hash, target);
|
*hashes_done = n;
|
||||||
|
|
||||||
*hashes_done = stat_ctr;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((n >= max_nonce) || work_restart[thr_id].restart) {
|
if ((n >= max_nonce) || work_restart[thr_id].restart) {
|
||||||
*hashes_done = stat_ctr;
|
*hashes_done = n;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user