mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
Make nTimeConnected const in CNode
This commit is contained in:
parent
321d0fc6b6
commit
644f1234e2
2 changed files with 2 additions and 2 deletions
|
@ -2574,6 +2574,7 @@ unsigned int CConnman::GetReceiveFloodSize() const { return nReceiveFloodSize; }
|
||||||
unsigned int CConnman::GetSendBufferSize() const{ return nSendBufferMaxSize; }
|
unsigned int CConnman::GetSendBufferSize() const{ return nSendBufferMaxSize; }
|
||||||
|
|
||||||
CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress& addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const std::string& addrNameIn, bool fInboundIn) :
|
CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress& addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const std::string& addrNameIn, bool fInboundIn) :
|
||||||
|
nTimeConnected(GetSystemTimeInSeconds()),
|
||||||
addr(addrIn),
|
addr(addrIn),
|
||||||
fInbound(fInboundIn),
|
fInbound(fInboundIn),
|
||||||
id(idIn),
|
id(idIn),
|
||||||
|
@ -2593,7 +2594,6 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
|
||||||
nLastRecv = 0;
|
nLastRecv = 0;
|
||||||
nSendBytes = 0;
|
nSendBytes = 0;
|
||||||
nRecvBytes = 0;
|
nRecvBytes = 0;
|
||||||
nTimeConnected = GetSystemTimeInSeconds();
|
|
||||||
nTimeOffset = 0;
|
nTimeOffset = 0;
|
||||||
addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;
|
addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;
|
||||||
nVersion = 0;
|
nVersion = 0;
|
||||||
|
|
|
@ -587,7 +587,7 @@ public:
|
||||||
|
|
||||||
std::atomic<int64_t> nLastSend;
|
std::atomic<int64_t> nLastSend;
|
||||||
std::atomic<int64_t> nLastRecv;
|
std::atomic<int64_t> nLastRecv;
|
||||||
int64_t nTimeConnected;
|
const int64_t nTimeConnected;
|
||||||
std::atomic<int64_t> nTimeOffset;
|
std::atomic<int64_t> nTimeOffset;
|
||||||
const CAddress addr;
|
const CAddress addr;
|
||||||
std::string addrName;
|
std::string addrName;
|
||||||
|
|
Loading…
Reference in a new issue