-
Notifications
You must be signed in to change notification settings - Fork 21
/
systeminfo.h
70 lines (59 loc) · 1.51 KB
/
systeminfo.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
63
64
65
66
67
68
69
70
struct SystemInfo {
char chainId[STRING_SIZE];
char chainName[STRING_SIZE];
char version[STRING_SIZE];
int tokenDecimals;
char tokenSymbol[STRING_SIZE];
};
struct SystemHealth {
long peers;
bool isSyncing;
bool shouldHavePeers;
};
struct PeerInfo {
char bestHash[STRING_SIZE];
unsigned long bestNumber;
char peerId[STRING_SIZE];
unsigned int protocolVersion;
char roles[STRING_SIZE];
};
struct PeersInfo {
int count;
PeerInfo peers[MAX_PEER_COUNT];
};
struct Endpoint {
char dialing[STRING_SIZE];
};
struct ConnectedPeerTime {
unsigned long nanos;
unsigned long secs;
};
struct ConnectedPeerInfo {
bool enabled;
Endpoint endpoint;
char knownAddresses[COLLECTION_SIZE][STRING_SIZE];
ConnectedPeerTime latestPingTime;
bool open;
char versionString[STRING_SIZE];
};
struct NotConnectedPeerInfo {
char knownAddresses[COLLECTION_SIZE][STRING_SIZE];
};
struct ConnectedPeer {
char key[STRING_SIZE];
ConnectedPeerInfo connectedPeerInfo;
};
struct NotConnectedPeer {
char key[STRING_SIZE];
NotConnectedPeerInfo notConnectedPeerInfo;
};
struct NetworkState {
unsigned int AverageDownloadPerSec;
unsigned int AverageUploadPerSec;
ConnectedPeer connectedPeers[COLLECTION_SIZE];
char externalAddresses[COLLECTION_SIZE][STRING_SIZE];
char listenedAddresses[COLLECTION_SIZE][STRING_SIZE];
NotConnectedPeer notConnectedPeers[COLLECTION_SIZE];
char peerId[STRING_SIZE];
char peerset[STRING_SIZE];
};