Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 4,501 Lines • ▼ Show 20 Lines | if (msg_type == NetMsgType::GETADDR) { | ||||
pfrom.fSentAddr = true; | pfrom.fSentAddr = true; | ||||
pfrom.vAddrToSend.clear(); | pfrom.vAddrToSend.clear(); | ||||
std::vector<CAddress> vAddr; | std::vector<CAddress> vAddr; | ||||
if (pfrom.HasPermission(PF_ADDR)) { | if (pfrom.HasPermission(PF_ADDR)) { | ||||
vAddr = | vAddr = | ||||
m_connman.GetAddresses(MAX_ADDR_TO_SEND, MAX_PCT_ADDR_TO_SEND); | m_connman.GetAddresses(MAX_ADDR_TO_SEND, MAX_PCT_ADDR_TO_SEND); | ||||
} else { | } else { | ||||
vAddr = | vAddr = m_connman.GetAddresses(pfrom, MAX_ADDR_TO_SEND, | ||||
m_connman.GetAddresses(pfrom.addr.GetNetwork(), | MAX_PCT_ADDR_TO_SEND); | ||||
MAX_ADDR_TO_SEND, MAX_PCT_ADDR_TO_SEND); | |||||
} | } | ||||
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; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,439 Lines • Show Last 20 Lines |