Browse Source

Merge commit '74c1194' into stratum

Conflicts:
	miner.c
Luke Dashjr 13 years ago
parent
commit
6bc82cd9d5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      miner.c

+ 2 - 2
miner.c

@@ -3768,7 +3768,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)) {
@@ -3795,7 +3795,7 @@ static bool test_work_current(struct work *work)
 
 
 	uint32_t block_id = ((uint32_t*)(work->data))[1];
 	uint32_t block_id = ((uint32_t*)(work->data))[1];
 
 
-	hexstr = bin2hex(&work->data[4], 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;