Browse Source

Put in a hack to prevent dud work from sneaking into test_work_current being seen as a new block.

Con Kolivas 13 years ago
parent
commit
526f579270
1 changed files with 3 additions and 0 deletions
  1. 3 0
      miner.c

+ 3 - 0
miner.c

@@ -4165,7 +4165,10 @@ static bool test_work_current(struct work *work)
 
 	uint32_t block_id = ((uint32_t*)(work->data))[1];
 
+	/* 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 */