From 6e308651c441cbf8763c67cc099c538c333c2872 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 7 Feb 2023 13:30:37 +0100 Subject: net: move IsReachable() code to netbase and encapsulate it `vfLimited`, `IsReachable()`, `SetReachable()` need not be in the `net` module. Move them to `netbase` because they will be needed in `LookupSubNet()` to possibly flip the result to CJDNS (if that network is reachable). In the process, encapsulate them in a class. `NET_UNROUTABLE` and `NET_INTERNAL` are no longer ignored when adding or removing reachable networks. This was unnecessary. --- src/netbase.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/netbase.cpp') diff --git a/src/netbase.cpp b/src/netbase.cpp index ca1a80d72f..16b5e1c70d 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -32,6 +32,8 @@ bool fNameLookup = DEFAULT_NAME_LOOKUP; std::chrono::milliseconds g_socks5_recv_timeout = 20s; static std::atomic interruptSocks5Recv(false); +ReachableNets g_reachable_nets; + std::vector WrappedGetAddrInfo(const std::string& name, bool allow_lookup) { addrinfo ai_hint{}; -- cgit v1.2.3