@@ -808,7 +808,7 @@ int AddrManImpl::GetEntry(bool use_tried, size_t bucket, size_t position) const
808808 return -1 ;
809809}
810810
811- std::vector<CAddress> AddrManImpl::GetAddr_ (size_t max_addresses, size_t max_pct, std::optional<Network> network) const
811+ std::vector<CAddress> AddrManImpl::GetAddr_ (size_t max_addresses, size_t max_pct, std::optional<Network> network, const bool filtered ) const
812812{
813813 AssertLockHeld (cs);
814814
@@ -838,7 +838,7 @@ std::vector<CAddress> AddrManImpl::GetAddr_(size_t max_addresses, size_t max_pct
838838 if (network != std::nullopt && ai.GetNetClass () != network) continue ;
839839
840840 // Filter for quality
841- if (ai.IsTerrible (now)) continue ;
841+ if (ai.IsTerrible (now) && filtered ) continue ;
842842
843843 addresses.push_back (ai);
844844 }
@@ -1209,11 +1209,11 @@ std::pair<CAddress, NodeSeconds> AddrManImpl::Select(bool new_only, std::optiona
12091209 return addrRet;
12101210}
12111211
1212- std::vector<CAddress> AddrManImpl::GetAddr (size_t max_addresses, size_t max_pct, std::optional<Network> network) const
1212+ std::vector<CAddress> AddrManImpl::GetAddr (size_t max_addresses, size_t max_pct, std::optional<Network> network, const bool filtered ) const
12131213{
12141214 LOCK (cs);
12151215 Check ();
1216- auto addresses = GetAddr_ (max_addresses, max_pct, network);
1216+ auto addresses = GetAddr_ (max_addresses, max_pct, network, filtered );
12171217 Check ();
12181218 return addresses;
12191219}
@@ -1315,9 +1315,9 @@ std::pair<CAddress, NodeSeconds> AddrMan::Select(bool new_only, std::optional<Ne
13151315 return m_impl->Select (new_only, network);
13161316}
13171317
1318- std::vector<CAddress> AddrMan::GetAddr (size_t max_addresses, size_t max_pct, std::optional<Network> network) const
1318+ std::vector<CAddress> AddrMan::GetAddr (size_t max_addresses, size_t max_pct, std::optional<Network> network, const bool filtered ) const
13191319{
1320- return m_impl->GetAddr (max_addresses, max_pct, network);
1320+ return m_impl->GetAddr (max_addresses, max_pct, network, filtered );
13211321}
13221322
13231323void AddrMan::Connected (const CService& addr, NodeSeconds time)
0 commit comments