mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-05 11:34:16 +00:00
Merge pull request #360 from denis2342/ztex
driver-ztex: search the complete noncerange based on the actual speed
This commit is contained in:
commit
3e8f74cad6
@ -151,7 +151,7 @@ static bool ztex_checkNonce(struct libztex_device *ztex,
|
||||
struct libztex_hash_data *hdata)
|
||||
{
|
||||
uint32_t *data32 = (uint32_t *)(work->data);
|
||||
unsigned char swap[128];
|
||||
unsigned char swap[80];
|
||||
uint32_t *swap32 = (uint32_t *)swap;
|
||||
unsigned char hash1[32];
|
||||
unsigned char hash2[32];
|
||||
@ -282,7 +282,7 @@ static int64_t ztex_scanhash(struct thr_info *thr, struct work *work,
|
||||
#endif
|
||||
if (nonce > noncecnt)
|
||||
noncecnt = nonce;
|
||||
if (((nonce & 0x7fffffff) >> 4) < ((lastnonce[i] & 0x7fffffff) >> 4)) {
|
||||
if (((0xffffffff - nonce) < (nonce - lastnonce[i])) || nonce < lastnonce[i]) {
|
||||
applog(LOG_DEBUG, "%s: overflow nonce=%0.8x lastnonce=%0.8x", ztex->repr, nonce, lastnonce[i]);
|
||||
overflow = true;
|
||||
} else
|
||||
|
Loading…
x
Reference in New Issue
Block a user