forked from gridcoin/Gridcoin-master
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal_objects_noui.hpp
196 lines (147 loc) · 4.05 KB
/
global_objects_noui.hpp
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
#ifndef GLOBAL_OBJECTS_NOUI_HPP
#define GLOBAL_OBJECTS_NOUI_HPP
extern int nBoincUtilization;
extern std::string sBoincMD5;
extern std::string sBoincBA;
extern std::string sRegVer;
extern std::string sBoincDeltaOverTime;
extern std::string sMinedHash;
extern std::string sSourceBlock;
extern int nRegVersion;
extern bool bDebugMode;
extern bool bBoincSubsidyEligible;
extern bool bPoolMiningMode;
extern bool bCPUMiningMode;
extern volatile bool bRestartGridcoinMiner;
extern volatile bool bCPIDsLoaded;
extern volatile bool bNetAveragesLoaded;
extern volatile bool bForceUpdate;
extern volatile bool bAllowBackToBack;
extern volatile double nGlobalNonce;
extern volatile double nGlobalHashCounter;
extern volatile double nGlobalSolutionNonce;
extern int miningthreadcount;
struct MiningEntry {
double shares;
std::string strComment;
std::string strAccount;
double payout;
double rbpps;
double totalutilization;
double totalrows;
double avgboinc;
bool paid;
double payments;
double lookback;
double difficulty;
int blockhour;
int wallethour;
std::string boinchash;
int projectid;
std::string projectuserid;
std::string transactionid;
double blocknumber;
double locktime;
std::string projectaddress;
double cpupowverificationtime;
double cpupowverificationresult;
double cpupowverificationtries;
std::string homogenizedkey;
std::string cpupowhash;
double credits;
double lastpaid;
double lastpaiddate;
double totalpayments;
double networkcredits;
double compensation;
double owed;
double approvedtransactions;
double nextpaymentamount;
double cputotalpayments;
double dummy1;
double dummy2;
double dummy3;
bool approved;
};
struct StructCPID {
std::string cpid;
std::string emailhash;
std::string cpidhash;
std::string projectname;
bool initialized;
double rac;
double utc;
double rectime;
double age;
std::string team;
bool activeproject;
double verifiedrac;
double verifiedutc;
std::string verifiedteam;
double verifiedrectime;
double verifiedage;
double entries;
double AverageRAC;
double NetworkProjects;
std::string boincpublickey;
bool Iscpidvalid;
std::string link;
std::string errors;
double NetworkRAC;
};
struct StructCPIDCache {
std::string cpid;
std::string cpidproject;
std::string xml;
bool initialized;
double blocknumber;
};
struct StructBlockCache {
std::string cpid;
std::string project;
double rac;
std::string hashBoinc;
bool initialized;
int nHeight;
std::string hash;
int BlockType;
int nVersion;
};
struct MiningCPID
{
std::string projectname;
double rac;
std::string encboincpublickey;
std::string cpid;
double pobdifficulty;
unsigned int diffbytes;
bool initialized;
std::string enccpid;
std::string aesskein;
std::string encaes;
double nonce;
double NetworkRAC;
int prevBlockType;
std::string clientversion;
};
extern std::map<int, int> blockcache;
//User CPIDs
extern std::map<std::string, StructCPID> mvCPIDs;
//Verified CPIDs
extern std::map<std::string, StructCPID> mvCreditNode;
//Network Averages
extern std::map<std::string, StructCPID> mvNetwork;
extern std::map<std::string, StructCPID> mvNetworkCPIDs;
extern std::map<std::string, StructCPID> mvCreditNodeCPIDProject; //Contains verified CPID+Projects;
//Caches
extern std::map<std::string, StructCPIDCache> mvCPIDCache; //Contains cached blocknumbers for CPID+Projects;
extern std::map<std::string, StructBlockCache> mvBlockCache; //Contains Cached Blocks
extern std::map<std::string, StructCPIDCache> mvAppCache; //Contains cached blocknumbers for CPID+Projects;
//Global CPU Mining CPID:
extern MiningCPID GlobalCPUMiningCPID;
//Boinc Valid Projects
extern std::map<std::string, StructCPID> mvBoincProjects; // Contains all of the allowed boinc projects;
// Timers
extern std::map<std::string, int> mvTimers; // Contains event timers that reset after max ms duration iterator is exceeded
extern double nMinerPaymentCount;
#endif /* GLOBAL_OBJECTS_NOUI_HPP */