NerdNos-Firmware/src/mining.h
BitMaker 35d7bcd634 Small hashrate increase
- Adjust delays on threads and add a delay on loop
- Move miner to core 1 with loop and omit 0 to let wifi work alone with stratum and monitor thread
2023-06-08 10:21:16 +02:00

31 lines
641 B
C

#ifndef MINING_API_H
#define MINING_API_H
// Mining
#define MAX_NONCE 5000000U
#define TARGET_NONCE 471136297U
#define DEFAULT_DIFFICULTY "1e-9"
#define KEEPALIVE_TIME_ms 30000
#define POOLINACTIVITY_TIME_ms 60000
#define TARGET_BUFFER_SIZE 64
void runMonitor(void *name);
void runStratumWorker(void *name);
void runMiner(void *name);
String printLocalTime(void);
typedef struct{
uint8_t bytearray_target[32];
uint8_t bytearray_pooltarget[32];
uint8_t merkle_result[32];
uint8_t bytearray_blockheader[80];
float poolDifficulty;
bool inRun;
bool newJob;
bool newJob2;
}miner_data;
#endif // UTILS_API_H