Browse Source

Create a stratum work structure to store current work variables.

Con Kolivas 13 years ago
parent
commit
64df34cd4e
1 changed files with 21 additions and 0 deletions
  1. 21 0
      miner.h

+ 21 - 0
miner.h

@@ -751,6 +751,26 @@ enum pool_enable {
 	POOL_REJECTING,
 	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 {
 struct pool {
 	int pool_no;
 	int pool_no;
 	int prio;
 	int prio;
@@ -822,6 +842,7 @@ struct pool {
 	int nonce2;
 	int nonce2;
 	bool has_stratum;
 	bool has_stratum;
 	bool stratum_active;
 	bool stratum_active;
+	struct stratum_work swork;
 };
 };
 
 
 #define GETWORK_MODE_TESTPOOL 'T'
 #define GETWORK_MODE_TESTPOOL 'T'