mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
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.
This commit is contained in:
@@ -32,6 +32,8 @@ bool fNameLookup = DEFAULT_NAME_LOOKUP;
|
||||
std::chrono::milliseconds g_socks5_recv_timeout = 20s;
|
||||
static std::atomic<bool> interruptSocks5Recv(false);
|
||||
|
||||
ReachableNets g_reachable_nets;
|
||||
|
||||
std::vector<CNetAddr> WrappedGetAddrInfo(const std::string& name, bool allow_lookup)
|
||||
{
|
||||
addrinfo ai_hint{};
|
||||
|
||||
Reference in New Issue
Block a user