Commit 64df34cd4e1bc1d74ff7b6ad803e03948e27b9cd

Con Kolivas 2012-09-27T13:26:09

Create a stratum work structure to store current work variables.

diff --git a/miner.h b/miner.h
index 1fb7181..af5c466 100644
--- a/miner.h
+++ b/miner.h
@@ -751,6 +751,26 @@ enum pool_enable {
 	POOL_REJECTING,
 };
 
+struct stratum_work {
+	/* id we sent to receive this work */
+	int id;
+	/* Reference to json structure all the following were extracted from */
+	json_t *json_val;
+
+	char *job_id;
+	char *prev_hash;
+	char *coinbase1;
+	char *coinbase2;
+	char *merkle1;
+	char *merkle2;
+	char *bbversion;
+	char *nbit;
+	char *ntime;
+	bool clean;
+
+	int diff;
+};
+
 struct pool {
 	int pool_no;
 	int prio;
@@ -822,6 +842,7 @@ struct pool {
 	int nonce2;
 	bool has_stratum;
 	bool stratum_active;
+	struct stratum_work swork;
 };
 
 #define GETWORK_MODE_TESTPOOL 'T'