mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-26 22:44:21 +00:00
Loop in bitforce scanhash till end nonce reaches full nonce range.
This commit is contained in:
parent
1f2e9a49f4
commit
e10aa2092b
@ -420,8 +420,9 @@ static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint6
|
|||||||
struct cgpu_info *bitforce = thr->cgpu;
|
struct cgpu_info *bitforce = thr->cgpu;
|
||||||
unsigned int sleep_time;
|
unsigned int sleep_time;
|
||||||
struct timeval tdiff;
|
struct timeval tdiff;
|
||||||
uint64_t ret;
|
uint64_t ret = 1;
|
||||||
|
|
||||||
|
while (bitforce->end_nonce < 0xffffffff) {
|
||||||
bitforce->wait_ms = 0;
|
bitforce->wait_ms = 0;
|
||||||
ret = bitforce_send_work(thr, work);
|
ret = bitforce_send_work(thr, work);
|
||||||
|
|
||||||
@ -457,13 +458,14 @@ static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint6
|
|||||||
ret = bitforce_get_result(thr, work);
|
ret = bitforce_get_result(thr, work);
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
ret = 1;
|
|
||||||
applog(LOG_ERR, "BFL%i: Comms error", bitforce->device_id);
|
applog(LOG_ERR, "BFL%i: Comms error", bitforce->device_id);
|
||||||
bitforce->device_last_not_well = time(NULL);
|
bitforce->device_last_not_well = time(NULL);
|
||||||
bitforce->device_not_well_reason = REASON_DEV_COMMS_ERROR;
|
bitforce->device_not_well_reason = REASON_DEV_COMMS_ERROR;
|
||||||
bitforce->dev_comms_error_count++;
|
bitforce->dev_comms_error_count++;
|
||||||
/* empty read buffer */
|
/* empty read buffer */
|
||||||
biforce_clear_buffer(bitforce);
|
biforce_clear_buffer(bitforce);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user