mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-03-28 02:31:56 +01:00
Job packets can have more that 1 midstate. If the stratum supports version-rolling, calculate additional midstates by incrementing the version with the version_mask provided by the stratum server. Currently does 4 midstates for each extranonce2.
37 lines
592 B
C
37 lines
592 B
C
#ifndef GLOBAL_STATE_H_
|
|
#define GLOBAL_STATE_H_
|
|
|
|
#include "work_queue.h"
|
|
#include "bm1397.h"
|
|
#include "system.h"
|
|
#include "stratum_api.h"
|
|
|
|
|
|
|
|
#define STRATUM_USER CONFIG_STRATUM_USER
|
|
|
|
|
|
typedef struct {
|
|
work_queue stratum_queue;
|
|
work_queue ASIC_jobs_queue;
|
|
|
|
bm1397Module BM1397_MODULE;
|
|
SystemModule SYSTEM_MODULE;
|
|
|
|
|
|
char * extranonce_str;
|
|
int extranonce_2_len;
|
|
int abandon_work;
|
|
|
|
uint8_t * valid_jobs;
|
|
pthread_mutex_t valid_jobs_lock;
|
|
|
|
uint32_t stratum_difficulty;
|
|
uint32_t version_mask;
|
|
|
|
int sock;
|
|
|
|
} GlobalState;
|
|
|
|
|
|
#endif /* GLOBAL_STATE_H_ */ |