Create a stratum work structure to store current work variables.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
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'