Commit 611c3164dc4b971a89273956f9bff3e0c77a5bf5

Con Kolivas 2012-11-05T10:55:55

Remove txn size debugging and enlarge gbt block string to prevent overflow.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/cgminer.c b/cgminer.c
index 7c2b550..6033073 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2295,7 +2295,7 @@ static bool submit_upstream_work(struct work *work, CURL *curl, bool resubmit)
 
 	/* build JSON-RPC request */
 	if (work->gbt) {
-		char gbt_block[512], *varint, *header;
+		char gbt_block[1024], *varint, *header;
 		unsigned char data[80];
 		int i;
 
@@ -2310,7 +2310,6 @@ static bool submit_upstream_work(struct work *work, CURL *curl, bool resubmit)
 		sprintf(gbt_block, "%s", header);
 		free(header);
 
-		applog(LOG_WARNING, "%d transactions", work->gbt_txns);
 		if (work->gbt_txns < 0xfd) {
 			uint8_t val = work->gbt_txns;