Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 4,469 Lines • ▼ Show 20 Lines | if (msg_type == NetMsgType::GETADDR) { | ||||
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(); | ||||
FastRandomContext insecure_rand; | FastRandomContext insecure_rand; | ||||
for (const CAddress &addr : vAddr) { | for (const CAddress &addr : vAddr) { | ||||
bool banned_or_discouraged = | |||||
m_banman && | |||||
(m_banman->IsDiscouraged(addr) || m_banman->IsBanned(addr)); | |||||
if (!banned_or_discouraged) { | |||||
pfrom.PushAddress(addr, insecure_rand); | pfrom.PushAddress(addr, insecure_rand); | ||||
} | } | ||||
} | |||||
return; | return; | ||||
} | } | ||||
if (msg_type == NetMsgType::MEMPOOL) { | if (msg_type == NetMsgType::MEMPOOL) { | ||||
if (!(pfrom.GetLocalServices() & NODE_BLOOM) && | if (!(pfrom.GetLocalServices() & NODE_BLOOM) && | ||||
!pfrom.HasPermission(PF_MEMPOOL)) { | !pfrom.HasPermission(PF_MEMPOOL)) { | ||||
if (!pfrom.HasPermission(PF_NOBAN)) { | if (!pfrom.HasPermission(PF_NOBAN)) { | ||||
LogPrint(BCLog::NET, | LogPrint(BCLog::NET, | ||||
▲ Show 20 Lines • Show All 1,431 Lines • Show Last 20 Lines |