Add time offset to getpeerinfo output

This commit is contained in:
Pavel Janík
2014-12-15 11:06:15 +01:00
parent 13c077c7cf
commit 26a6bae753
5 changed files with 10 additions and 4 deletions

View File

@@ -523,6 +523,7 @@ void CNode::copyStats(CNodeStats &stats)
X(nLastSend);
X(nLastRecv);
X(nTimeConnected);
X(nTimeOffset);
X(addrName);
X(nVersion);
X(cleanSubVer);
@@ -1934,6 +1935,7 @@ CNode::CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn, bool fIn
nSendBytes = 0;
nRecvBytes = 0;
nTimeConnected = GetTime();
nTimeOffset = 0;
addr = addrIn;
addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;
nVersion = 0;