mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
p2p: allow CAddrMan::GetAddr() by network, add doxygen
This commit is contained in:
parent
c38981e748
commit
a49f3ddbba
5 changed files with 24 additions and 13 deletions
|
|
@ -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);}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue