33 lines
676 B
C
33 lines
676 B
C
|
|
#ifndef CONFIG_H
|
||
|
|
#define CONFIG_H
|
||
|
|
|
||
|
|
#include <stdbool.h>
|
||
|
|
#include <stdint.h>
|
||
|
|
|
||
|
|
typedef struct {
|
||
|
|
char rpc_user[128];
|
||
|
|
char rpc_password[128];
|
||
|
|
char rpc_host[128];
|
||
|
|
int rpc_port;
|
||
|
|
|
||
|
|
char wallet_address[128];
|
||
|
|
|
||
|
|
double difficulty_factor;
|
||
|
|
char nonce_mode[16];
|
||
|
|
int timestamp_update_interval;
|
||
|
|
uint32_t batch;
|
||
|
|
char coinbase_message[128];
|
||
|
|
char extranonce1[128];
|
||
|
|
char extranonce2[128];
|
||
|
|
|
||
|
|
int num_processors;
|
||
|
|
int check_interval;
|
||
|
|
} MinerConfig;
|
||
|
|
|
||
|
|
void config_set_defaults(MinerConfig *cfg);
|
||
|
|
bool config_load(const char *path, MinerConfig *cfg);
|
||
|
|
bool config_validate(const MinerConfig *cfg);
|
||
|
|
void config_print(const MinerConfig *cfg);
|
||
|
|
|
||
|
|
#endif
|