From 2cf0767cff82f1d0c070006c0dba20910146a36d Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 11 Nov 2012 16:33:20 +1100 Subject: [PATCH] Put in a hack to prevent dud work from sneaking into test_work_current being seen as a new block. --- cgminer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cgminer.c b/cgminer.c index 78a2b423..f4c67004 100644 --- a/cgminer.c +++ b/cgminer.c @@ -3533,7 +3533,10 @@ static bool test_work_current(struct work *work) if (work->mandatory) return ret; + /* Hack to work around dud work sneaking into test */ hexstr = bin2hex(work->data + 8, 18); + if (!strncmp(hexstr, "000000000000000000000000000000000000", 36)) + goto out_free; /* Search to see if this block exists yet and if not, consider it a * new block and set the current block details to this one */