Permalink
Browse files

Merge #8154: drop vAddrToSend after sending big addr message

d3d02d5 drop vAddrToSend after sending big addr message (Kaz Wesley)
  • Loading branch information...
laanwj committed Jun 9, 2016
2 parents d366185 + d3d02d5 commit 1445835bd3c41ce17092dd9439f262fa29606d7c
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/main.cpp
View
@@ -5725,6 +5725,9 @@ bool SendMessages(CNode* pto)
pto->vAddrToSend.clear();
if (!vAddr.empty())
pto->PushMessage(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());

0 comments on commit 1445835

Please sign in to comment.