Merge #8154: drop vAddrToSend after sending big addr message
d3d02d5
drop vAddrToSend after sending big addr message (Kaz Wesley)
This commit is contained in:
commit
1445835bd3
1 changed files with 3 additions and 0 deletions
|
@ -5725,6 +5725,9 @@ bool SendMessages(CNode* pto)
|
||||||
pto->vAddrToSend.clear();
|
pto->vAddrToSend.clear();
|
||||||
if (!vAddr.empty())
|
if (!vAddr.empty())
|
||||||
pto->PushMessage(NetMsgType::ADDR, vAddr);
|
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());
|
CNodeState &state = *State(pto->GetId());
|
||||||
|
|
Loading…
Add table
Reference in a new issue