MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetAddresses

Method GetAddresses

src/net.cpp:2788–2797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2786}
2787
2788std::vector<CAddress> CConnman::GetAddresses(size_t max_addresses, size_t max_pct, std::optional<Network> network) const
2789{
2790 std::vector<CAddress> addresses = addrman.GetAddr(max_addresses, max_pct, network);
2791 if (m_banman) {
2792 addresses.erase(std::remove_if(addresses.begin(), addresses.end(),
2793 [this](const CAddress& addr){return m_banman->IsDiscouraged(addr) || m_banman->IsBanned(addr);}),
2794 addresses.end());
2795 }
2796 return addresses;
2797}
2798
2799std::vector<CAddress> CConnman::GetAddresses(CNode& requestor, size_t max_addresses, size_t max_pct)
2800{

Callers 3

ProcessMessageMethod · 0.80
FUZZ_TARGET_INITFunction · 0.80
getnodeaddressesFunction · 0.80

Calls 12

GetAddrMethod · 0.80
IsDiscouragedMethod · 0.80
IsBannedMethod · 0.80
GetAddrBytesMethod · 0.80
GetNetworkMethod · 0.80
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
FinalizeMethod · 0.45
WriteMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by 1

FUZZ_TARGET_INITFunction · 0.64