aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-10-14 10:31:42 +0200
committerfanquake <fanquake@gmail.com>2020-10-19 10:59:49 +0800
commit6113b547f4cce8be732bf45687a74eccf4a3abfc (patch)
tree60668341aae5843b3cb42118f03e1333bba9f8d2
parentbdf15d0d5d12eb33594b90ebb48366ea7bb5c3d9 (diff)
net: Send post-verack handshake messages at most once
Github-Pull: #20146 Rebased-From: fa1f6f237d02265af616129402fa2b8a3019dda5
-rw-r--r--src/net_processing.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 8572ebb9f7..f6d4e113ae 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -2119,6 +2119,8 @@ bool ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStream& vRec
if (msg_type == NetMsgType::VERACK)
{
+ if (pfrom->fSuccessfullyConnected) return true;
+
pfrom->SetRecvVersion(std::min(pfrom->nVersion.load(), PROTOCOL_VERSION));
if (!pfrom->fInbound) {