diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-10-14 10:31:42 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-10-14 10:09:50 +0200 |
commit | fa1f6f237d02265af616129402fa2b8a3019dda5 (patch) | |
tree | b519bd3e748a93a1bcf89f4db160bfac4e88894b /src/net_processing.cpp | |
parent | ec0453cd57736df33e9f50c004d88bea10428ad5 (diff) | |
download | bitcoin-fa1f6f237d02265af616129402fa2b8a3019dda5.tar.xz |
net: Send post-verack handshake messages at most once
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 9ad3f5d6f4..6c601ed270 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2555,8 +2555,9 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat // At this point, the outgoing message serialization version can't change. const CNetMsgMaker msgMaker(pfrom.GetCommonVersion()); - if (msg_type == NetMsgType::VERACK) - { + if (msg_type == NetMsgType::VERACK) { + if (pfrom.fSuccessfullyConnected) return; + if (!pfrom.IsInboundConn()) { // Mark this node as currently connected, so we update its timestamp later. LOCK(cs_main); |