1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 13:04:29 +00:00

Offset the current block detection to the prev block hash.

This commit is contained in:
Con Kolivas 2012-10-03 09:42:20 +10:00
parent c6a3d065fa
commit 74c11945f0

View File

@ -3044,7 +3044,7 @@ static bool block_exists(char *hexstr)
/* Tests if this work is from a block that has been seen before */ /* Tests if this work is from a block that has been seen before */
static inline bool from_existing_block(struct work *work) static inline bool from_existing_block(struct work *work)
{ {
char *hexstr = bin2hex(work->data, 18); char *hexstr = bin2hex(work->data + 8, 18);
bool ret; bool ret;
if (unlikely(!hexstr)) { if (unlikely(!hexstr)) {
@ -3069,7 +3069,7 @@ static bool test_work_current(struct work *work)
if (work->mandatory) if (work->mandatory)
return ret; return ret;
hexstr = bin2hex(work->data, 18); hexstr = bin2hex(work->data + 8, 18);
if (unlikely(!hexstr)) { if (unlikely(!hexstr)) {
applog(LOG_ERR, "stage_thread OOM"); applog(LOG_ERR, "stage_thread OOM");
return ret; return ret;