Commit 8bc677a6ca856d0476d10dd84194dfaaee2cb981

Con Kolivas 2012-11-05T14:44:58

Calculate midstate for gbt work and remove now unused variable.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/cgminer.c b/cgminer.c
index bc86c9c..fab5a1f 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -1506,6 +1506,7 @@ static void gen_gbt_work(struct pool *pool, struct work *work)
 		free(header);
 	}
 
+	calc_midstate(work);
 	local_work++;
 	work->pool = pool;
 	work->gbt = true;
@@ -2298,7 +2299,6 @@ static bool submit_upstream_work(struct work *work, CURL *curl, bool resubmit)
 	if (work->gbt) {
 		char gbt_block[1024], *varint, *header;
 		unsigned char data[80];
-		int i;
 
 		flip256(data, work->data);
 		header = bin2hex(data, 80);