Browse Source

bflsc ignore very first work item nonce error - could be from before

nfactor-troky
Kano 12 years ago
parent
commit
ac135bf3af
  1. 8
      driver-bflsc.c

8
driver-bflsc.c

@ -110,6 +110,7 @@ struct bflsc_info {
unsigned int default_ms_work; unsigned int default_ms_work;
bool shutdown; bool shutdown;
bool flash_led; bool flash_led;
bool not_first_work; // allow ignoring the first nonce error
}; };
#define BFLSC_XLINKHDR '@' #define BFLSC_XLINKHDR '@'
@ -1290,8 +1291,9 @@ static void process_nonces(struct cgpu_info *bflsc, int dev, char *xlink, char *
work = find_queued_work_bymidstate(bflsc, midstate, MIDSTATE_BYTES, work = find_queued_work_bymidstate(bflsc, midstate, MIDSTATE_BYTES,
blockdata, MERKLE_OFFSET, MERKLE_BYTES); blockdata, MERKLE_OFFSET, MERKLE_BYTES);
if (!work) { if (!work) {
applog(LOG_ERR, "%s%i:%s failed to find nonce work - can't be processed - ignored", if (sc_info->not_first_work)
bflsc->drv->name, bflsc->device_id, xlink); applog(LOG_ERR, "%s%i:%s failed to find nonce work - can't be processed - ignored",
bflsc->drv->name, bflsc->device_id, xlink);
return; return;
} }
@ -1397,6 +1399,7 @@ static int process_results(struct cgpu_info *bflsc, int dev, char *buf, int *non
breakdown(NOCOLON, items[i + QUE_RES_LINES_MIN - 1], &count, &firstname, &fields, &lf); breakdown(NOCOLON, items[i + QUE_RES_LINES_MIN - 1], &count, &firstname, &fields, &lf);
process_nonces(bflsc, dev, &(xlink[0]), items[i], count, fields, nonces); process_nonces(bflsc, dev, &(xlink[0]), items[i], count, fields, nonces);
freebreakdown(&count, &firstname, &fields); freebreakdown(&count, &firstname, &fields);
sc_info->not_first_work = true;
} }
arigatou: arigatou:
@ -1458,6 +1461,7 @@ static void *bflsc_get_results(void *userdata)
// TODO: do what else? // TODO: do what else?
} else { } else {
que = process_results(bflsc, dev, buf, &nonces); que = process_results(bflsc, dev, buf, &nonces);
sc_info->not_first_work = true; // in case it failed processing it
if (que > 0) if (que > 0)
cgtime(&(sc_info->sc_devs[dev].last_dev_result)); cgtime(&(sc_info->sc_devs[dev].last_dev_result));
if (nonces > 0) if (nonces > 0)

Loading…
Cancel
Save