Merge #8154: drop vAddrToSend after sending big addr message
d3d02d5 drop vAddrToSend after sending big addr message (Kaz Wesley)
This commit is contained in:
parent
ca228f09ff
commit
aa6cb48bfa
@ -2364,6 +2364,9 @@ bool SendMessages(CNode* pto, CConnman& connman, std::atomic<bool>& 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());
|
||||
|
Loading…
Reference in New Issue
Block a user