-
Notifications
You must be signed in to change notification settings - Fork 106
/
jconf.h
62 lines (45 loc) · 1010 Bytes
/
jconf.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#pragma once
#include <stdlib.h>
#include <string>
class jconf
{
public:
static jconf* inst()
{
if (oInst == nullptr) oInst = new jconf;
return oInst;
};
bool parse_config(const char* sFilename);
struct thd_cfg {
size_t index;
size_t intensity;
size_t w_size;
long long cpu_aff;
};
size_t GetThreadCount();
bool GetThreadConfig(size_t id, thd_cfg &cfg);
size_t GetPlatformIdx();
bool GetTlsSetting();
bool TlsSecureAlgos();
const char* GetTlsFingerprint();
const char* GetPoolAddress();
const char* GetPoolPwd();
const char* GetWalletAddress();
uint64_t GetVerboseLevel();
uint64_t GetAutohashTime();
const char* GetOutputFile();
uint64_t GetCallTimeout();
uint64_t GetNetRetry();
uint64_t GetGiveUpLimit();
uint16_t GetHttpdPort();
bool DaemonMode();
bool PreferIpv4();
inline bool HaveHardwareAes() { return bHaveAes; }
private:
jconf();
static jconf* oInst;
bool check_cpu_features();
struct opaque_private;
opaque_private* prv;
bool bHaveAes;
};