mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-26 22:44:21 +00:00
Make mining threads report out during work submission.
This commit is contained in:
parent
bb3b227b9b
commit
04d530f36a
@ -5556,6 +5556,8 @@ void submit_nonce(struct thr_info *thr, struct work *work, uint32_t nonce)
|
|||||||
uint32_t *hash2_32 = (uint32_t *)hash2;
|
uint32_t *hash2_32 = (uint32_t *)hash2;
|
||||||
uint32_t diff1targ;
|
uint32_t diff1targ;
|
||||||
|
|
||||||
|
thread_reportout(thr);
|
||||||
|
|
||||||
cgtime(&tv_work_found);
|
cgtime(&tv_work_found);
|
||||||
*work_nonce = htole32(nonce);
|
*work_nonce = htole32(nonce);
|
||||||
|
|
||||||
@ -5575,7 +5577,7 @@ void submit_nonce(struct thr_info *thr, struct work *work, uint32_t nonce)
|
|||||||
thr->cgpu->drv->name, thr->cgpu->device_id);
|
thr->cgpu->drv->name, thr->cgpu->device_id);
|
||||||
|
|
||||||
inc_hw_errors(thr);
|
inc_hw_errors(thr);
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_lock(&stats_lock);
|
mutex_lock(&stats_lock);
|
||||||
@ -5584,10 +5586,12 @@ void submit_nonce(struct thr_info *thr, struct work *work, uint32_t nonce)
|
|||||||
|
|
||||||
if (!fulltest(hash2, work->target)) {
|
if (!fulltest(hash2, work->target)) {
|
||||||
applog(LOG_INFO, "Share below target");
|
applog(LOG_INFO, "Share below target");
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
submit_work_async(work, &tv_work_found);
|
submit_work_async(work, &tv_work_found);
|
||||||
|
out:
|
||||||
|
thread_reportin(thr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool abandon_work(struct work *work, struct timeval *wdiff, uint64_t hashes)
|
static inline bool abandon_work(struct work *work, struct timeval *wdiff, uint64_t hashes)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user