|
|
@ -5212,6 +5212,14 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Only send one GetAddr response per connection to reduce resource waste
|
|
|
|
|
|
|
|
// and discourage addr stamping of INV announcements.
|
|
|
|
|
|
|
|
if (pfrom->fSentAddr) { |
|
|
|
|
|
|
|
LogPrint("net", "Ignoring repeated \"getaddr\". peer=%d\n", pfrom->id); |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
pfrom->fSentAddr = true; |
|
|
|
|
|
|
|
|
|
|
|
pfrom->vAddrToSend.clear(); |
|
|
|
pfrom->vAddrToSend.clear(); |
|
|
|
vector<CAddress> vAddr = addrman.GetAddr(); |
|
|
|
vector<CAddress> vAddr = addrman.GetAddr(); |
|
|
|
BOOST_FOREACH(const CAddress &addr, vAddr) |
|
|
|
BOOST_FOREACH(const CAddress &addr, vAddr) |
|
|
|