mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
p2p: allow CAddrMan::GetAddr() by network, add doxygen
This commit is contained in:
@@ -2671,7 +2671,7 @@ CConnman::~CConnman()
|
||||
|
||||
std::vector<CAddress> CConnman::GetAddresses(size_t max_addresses, size_t max_pct) const
|
||||
{
|
||||
std::vector<CAddress> addresses = addrman.GetAddr(max_addresses, max_pct);
|
||||
std::vector<CAddress> addresses = addrman.GetAddr(max_addresses, max_pct, /* network */ std::nullopt);
|
||||
if (m_banman) {
|
||||
addresses.erase(std::remove_if(addresses.begin(), addresses.end(),
|
||||
[this](const CAddress& addr){return m_banman->IsDiscouraged(addr) || m_banman->IsBanned(addr);}),
|
||||
|
||||
Reference in New Issue
Block a user