aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-10-14 10:31:42 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-10-14 10:09:50 +0200
commitfa1f6f237d02265af616129402fa2b8a3019dda5 (patch)
treeb519bd3e748a93a1bcf89f4db160bfac4e88894b /src/net_processing.cpp
parentec0453cd57736df33e9f50c004d88bea10428ad5 (diff)
downloadbitcoin-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.cpp5
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);