|
|
|
@ -52,6 +52,9 @@ public:
@@ -52,6 +52,9 @@ public:
|
|
|
|
|
int blocks; |
|
|
|
|
double uptime[5]; |
|
|
|
|
std::string clientSubVersion; |
|
|
|
|
int64_t lastSuccess; |
|
|
|
|
bool fGood; |
|
|
|
|
uint64_t services; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -61,6 +64,7 @@ private:
@@ -61,6 +64,7 @@ private:
|
|
|
|
|
uint64_t services; |
|
|
|
|
int64 lastTry; |
|
|
|
|
int64 ourLastTry; |
|
|
|
|
int64 ourLastSuccess; |
|
|
|
|
int64 ignoreTill; |
|
|
|
|
CAddrStat stat2H; |
|
|
|
|
CAddrStat stat8H; |
|
|
|
@ -73,7 +77,7 @@ private:
@@ -73,7 +77,7 @@ private:
|
|
|
|
|
int success; |
|
|
|
|
std::string clientSubVersion; |
|
|
|
|
public: |
|
|
|
|
CAddrInfo() : services(0), lastTry(0), ourLastTry(0), ignoreTill(0), clientVersion(0), blocks(0), total(0), success(0) {} |
|
|
|
|
CAddrInfo() : services(0), lastTry(0), ourLastTry(0), ourLastSuccess(0), ignoreTill(0), clientVersion(0), blocks(0), total(0), success(0) {} |
|
|
|
|
|
|
|
|
|
CAddrReport GetReport() const { |
|
|
|
|
CAddrReport ret; |
|
|
|
@ -86,6 +90,9 @@ public:
@@ -86,6 +90,9 @@ public:
|
|
|
|
|
ret.uptime[2] = stat1D.reliability; |
|
|
|
|
ret.uptime[3] = stat1W.reliability; |
|
|
|
|
ret.uptime[4] = stat1M.reliability; |
|
|
|
|
ret.lastSuccess = ourLastSuccess; |
|
|
|
|
ret.fGood = IsGood(); |
|
|
|
|
ret.services = services; |
|
|
|
|
return ret; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -126,7 +133,7 @@ public:
@@ -126,7 +133,7 @@ public:
|
|
|
|
|
friend class CAddrDb; |
|
|
|
|
|
|
|
|
|
IMPLEMENT_SERIALIZE ( |
|
|
|
|
unsigned char version = 3; |
|
|
|
|
unsigned char version = 4; |
|
|
|
|
READWRITE(version); |
|
|
|
|
READWRITE(ip); |
|
|
|
|
READWRITE(services); |
|
|
|
@ -152,6 +159,8 @@ public:
@@ -152,6 +159,8 @@ public:
|
|
|
|
|
READWRITE(clientSubVersion); |
|
|
|
|
if (version >= 3) |
|
|
|
|
READWRITE(blocks); |
|
|
|
|
if (version >= 4) |
|
|
|
|
READWRITE(ourLastSuccess); |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
}; |
|
|
|
|