diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-09-04 15:43:21 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-09-04 16:27:38 +0200 |
commit | 93ff1b9041a8282cd0785d22edbc1fd67b29533b (patch) | |
tree | afdfec94cfa3c22dfdd4875d0f2bd3a0c9d4868b | |
parent | bbc2b39860f66b4c7b191f9f069eb6fd3a56f73b (diff) | |
download | bitcoin-93ff1b9041a8282cd0785d22edbc1fd67b29533b.tar.xz |
net: correctly initialize nMinPingUsecTime
`nMinPingUsecTime` was left uninitialized in CNode.
The correct initialization for a minimum-until-now is int64_t's max value, so initialize it to that.
Thanks @MarcoFalke for noticing.
-rw-r--r-- | src/net.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index 526e2049a8..87c4f0af0a 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2261,6 +2261,7 @@ CNode::CNode(SOCKET hSocketIn, const CAddress& addrIn, const std::string& addrNa nPingUsecStart = 0; nPingUsecTime = 0; fPingQueued = false; + nMinPingUsecTime = std::numeric_limits<int64_t>::max(); { LOCK(cs_nLastNodeId); |