diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-06-09 08:13:11 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-06-09 08:13:14 +0200 |
| commit | 1445835bd3c41ce17092dd9439f262fa29606d7c (patch) | |
| tree | 0c3af1642a1f51891e90cb771d13eb2f99ff8279 /src/main.cpp | |
| parent | Merge #8168: util: Add ParseUInt32 and ParseUInt64 (diff) | |
| parent | drop vAddrToSend after sending big addr message (diff) | |
| download | discoin-1445835bd3c41ce17092dd9439f262fa29606d7c.tar.xz discoin-1445835bd3c41ce17092dd9439f262fa29606d7c.zip | |
Merge #8154: drop vAddrToSend after sending big addr message
d3d02d5 drop vAddrToSend after sending big addr message (Kaz Wesley)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 72d9a3d44..6d006e878 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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()); |