1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-25 14:04:25 +00:00

Loop in bitforce scanhash till end nonce reaches full nonce range.

This commit is contained in:
Con Kolivas 2012-07-05 00:14:04 +10:00
parent 1f2e9a49f4
commit e10aa2092b

View File

@ -420,8 +420,9 @@ static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint6
struct cgpu_info *bitforce = thr->cgpu;
unsigned int sleep_time;
struct timeval tdiff;
uint64_t ret;
uint64_t ret = 1;
while (bitforce->end_nonce < 0xffffffff) {
bitforce->wait_ms = 0;
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);
if (!ret) {
ret = 1;
applog(LOG_ERR, "BFL%i: Comms error", bitforce->device_id);
bitforce->device_last_not_well = time(NULL);
bitforce->device_not_well_reason = REASON_DEV_COMMS_ERROR;
bitforce->dev_comms_error_count++;
/* empty read buffer */
biforce_clear_buffer(bitforce);
return 1;
}
}
return ret;
}