More timedate changes from KMD 0.6

This commit is contained in:
Duke Leto
2020-07-09 10:31:12 -04:00
parent e959ea9768
commit d4883bce7c
12 changed files with 76 additions and 72 deletions

View File

@@ -1,6 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2019 The Hush developers
// Copyright (c) 2019-2020 The Hush developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -193,7 +193,7 @@ CAddress GetLocalAddress(const CNetAddr *paddrPeer)
ret = CAddress(addr);
}
ret.nServices = nLocalServices;
ret.nTime = GetAdjustedTime();
ret.nTime = GetTime();
return ret;
}
@@ -393,7 +393,7 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest)
/// debug print
LogPrint("net", "trying connection %s lastseen=%.1fhrs\n",
pszDest ? pszDest : addrConnect.ToString(),
pszDest ? 0.0 : (double)(GetAdjustedTime() - addrConnect.nTime)/3600.0);
pszDest ? 0.0 : (double)(GetTime() - addrConnect.nTime)/3600.0);
// Connect
SOCKET hSocket;
@@ -458,7 +458,7 @@ void CNode::PushVersion()
{
int nBestHeight = g_signals.GetHeight().get_value_or(0);
int64_t nTime = (fInbound ? GetAdjustedTime() : GetTime());
int64_t nTime = (fInbound ? GetTime() : GetTime());
CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService("0.0.0.0",0)));
CAddress addrMe = GetLocalAddress(&addr);
GetRandBytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce));
@@ -1429,7 +1429,7 @@ void ThreadOpenConnections()
}
}
int64_t nANow = GetAdjustedTime();
int64_t nANow = GetTime();
int nTries = 0;
while (true)