From aa6cb48bfa1aa73597ce1721fdcceb666c8f9162 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 9 Jun 2016 08:13:11 +0200 Subject: [PATCH] Merge #8154: drop vAddrToSend after sending big addr message d3d02d5 drop vAddrToSend after sending big addr message (Kaz Wesley) --- src/net_processing.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 1d28374e01..6463d08bcf 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2364,6 +2364,9 @@ bool SendMessages(CNode* pto, CConnman& connman, std::atomic& interruptMsg pto->vAddrToSend.clear(); if (!vAddr.empty()) connman.PushMessage(pto, NetMsgType::ADDR, vAddr); + // we only send the big addr message once + if (pto->vAddrToSend.capacity() > 40) + pto->vAddrToSend.shrink_to_fit(); } CNodeState &state = *State(pto->GetId());