@@ -800,7 +800,7 @@ int AddrManImpl::GetEntry(bool use_tried, size_t bucket, size_t position) const
800800 return -1 ;
801801}
802802
803- std::vector<CAddress> AddrManImpl::GetAddr_ (size_t max_addresses, size_t max_pct, std::optional<Network> network) const
803+ std::vector<CAddress> AddrManImpl::GetAddr_ (size_t max_addresses, size_t max_pct, std::optional<Network> network, const bool filtered ) const
804804{
805805 AssertLockHeld (cs);
806806
@@ -830,7 +830,7 @@ std::vector<CAddress> AddrManImpl::GetAddr_(size_t max_addresses, size_t max_pct
830830 if (network != std::nullopt && ai.GetNetClass () != network) continue ;
831831
832832 // Filter for quality
833- if (ai.IsTerrible (now)) continue ;
833+ if (ai.IsTerrible (now) && filtered ) continue ;
834834
835835 addresses.push_back (ai);
836836 }
@@ -1214,11 +1214,11 @@ std::pair<CAddress, NodeSeconds> AddrManImpl::Select(bool new_only, std::optiona
12141214 return addrRet;
12151215}
12161216
1217- std::vector<CAddress> AddrManImpl::GetAddr (size_t max_addresses, size_t max_pct, std::optional<Network> network) const
1217+ std::vector<CAddress> AddrManImpl::GetAddr (size_t max_addresses, size_t max_pct, std::optional<Network> network, const bool filtered ) const
12181218{
12191219 LOCK (cs);
12201220 Check ();
1221- auto addresses = GetAddr_ (max_addresses, max_pct, network);
1221+ auto addresses = GetAddr_ (max_addresses, max_pct, network, filtered );
12221222 Check ();
12231223 return addresses;
12241224}
@@ -1317,9 +1317,9 @@ std::pair<CAddress, NodeSeconds> AddrMan::Select(bool new_only, std::optional<Ne
13171317 return m_impl->Select (new_only, network);
13181318}
13191319
1320- std::vector<CAddress> AddrMan::GetAddr (size_t max_addresses, size_t max_pct, std::optional<Network> network) const
1320+ std::vector<CAddress> AddrMan::GetAddr (size_t max_addresses, size_t max_pct, std::optional<Network> network, const bool filtered ) const
13211321{
1322- return m_impl->GetAddr (max_addresses, max_pct, network);
1322+ return m_impl->GetAddr (max_addresses, max_pct, network, filtered );
13231323}
13241324
13251325std::vector<std::pair<AddrInfo, AddressPosition>> AddrMan::GetEntries (bool use_tried) const
0 commit comments