Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 4,466 Lines • ▼ Show 20 Lines | if (msg_type == NetMsgType::GETADDR) { | ||||
if (pfrom.fSentAddr) { | if (pfrom.fSentAddr) { | ||||
LogPrint(BCLog::NET, "Ignoring repeated \"getaddr\". peer=%d\n", | LogPrint(BCLog::NET, "Ignoring repeated \"getaddr\". peer=%d\n", | ||||
pfrom.GetId()); | pfrom.GetId()); | ||||
return; | return; | ||||
} | } | ||||
pfrom.fSentAddr = true; | pfrom.fSentAddr = true; | ||||
pfrom.vAddrToSend.clear(); | pfrom.vAddrToSend.clear(); | ||||
std::vector<CAddress> vAddr = m_connman.GetAddresses(); | std::vector<CAddress> vAddr = | ||||
m_connman.GetAddresses(pfrom.addr.GetNetwork()); | |||||
FastRandomContext insecure_rand; | FastRandomContext insecure_rand; | ||||
for (const CAddress &addr : vAddr) { | for (const CAddress &addr : vAddr) { | ||||
pfrom.PushAddress(addr, insecure_rand); | pfrom.PushAddress(addr, insecure_rand); | ||||
} | } | ||||
return; | return; | ||||
} | } | ||||
if (msg_type == NetMsgType::MEMPOOL) { | if (msg_type == NetMsgType::MEMPOOL) { | ||||
▲ Show 20 Lines • Show All 1,436 Lines • Show Last 20 Lines |