mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Use take_queued_work_bymidstate in the bflsc driver to avoid the rare chance repeated results come back from the same work item.
This commit is contained in:
parent
572df10207
commit
e17a945277
@ -1250,8 +1250,8 @@ static void process_nonces(struct cgpu_info *bflsc, int dev, char *xlink, char *
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
work = find_queued_work_bymidstate(bflsc, midstate, MIDSTATE_BYTES,
|
work = take_queued_work_bymidstate(bflsc, midstate, MIDSTATE_BYTES,
|
||||||
blockdata, MERKLE_OFFSET, MERKLE_BYTES);
|
blockdata, MERKLE_OFFSET, MERKLE_BYTES);
|
||||||
if (!work) {
|
if (!work) {
|
||||||
if (sc_info->not_first_work) {
|
if (sc_info->not_first_work) {
|
||||||
applog(LOG_INFO, "%s%i:%s failed to find nonce work - can't be processed - ignored",
|
applog(LOG_INFO, "%s%i:%s failed to find nonce work - can't be processed - ignored",
|
||||||
@ -1297,7 +1297,7 @@ static void process_nonces(struct cgpu_info *bflsc, int dev, char *xlink, char *
|
|||||||
sc_info->sc_devs[dev].work_queued -= 1;
|
sc_info->sc_devs[dev].work_queued -= 1;
|
||||||
wr_unlock(&(sc_info->stat_lock));
|
wr_unlock(&(sc_info->stat_lock));
|
||||||
|
|
||||||
work_completed(bflsc, work);
|
free_work(work);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int process_results(struct cgpu_info *bflsc, int dev, char *buf, int *nonces)
|
static int process_results(struct cgpu_info *bflsc, int dev, char *buf, int *nonces)
|
||||||
|
Loading…
Reference in New Issue
Block a user