From 74c11945f07fe02ba4962b379c8f1fbf51a68b1c Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 3 Oct 2012 09:42:20 +1000 Subject: [PATCH] Offset the current block detection to the prev block hash. --- cgminer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgminer.c b/cgminer.c index 653c2b1f..7bdf6403 100644 --- a/cgminer.c +++ b/cgminer.c @@ -3044,7 +3044,7 @@ static bool block_exists(char *hexstr) /* Tests if this work is from a block that has been seen before */ static inline bool from_existing_block(struct work *work) { - char *hexstr = bin2hex(work->data, 18); + char *hexstr = bin2hex(work->data + 8, 18); bool ret; if (unlikely(!hexstr)) { @@ -3069,7 +3069,7 @@ static bool test_work_current(struct work *work) if (work->mandatory) return ret; - hexstr = bin2hex(work->data, 18); + hexstr = bin2hex(work->data + 8, 18); if (unlikely(!hexstr)) { applog(LOG_ERR, "stage_thread OOM"); return ret;