diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2023-02-07 13:30:37 +0100 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2023-10-05 15:10:34 +0200 |
commit | 6e308651c441cbf8763c67cc099c538c333c2872 (patch) | |
tree | 7d4ddc4737c3a19fcb560fc33fe9bfbea56b7f35 /src/net.h | |
parent | c42ded3d9bda8b273780a4a81490bbf1b9e9c261 (diff) |
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.
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 10 |
1 files changed, 0 insertions, 10 deletions
@@ -160,16 +160,6 @@ enum /** Returns a local address that we should advertise to this peer. */ std::optional<CService> GetLocalAddrForPeer(CNode& node); -/** - * Mark a network as reachable or unreachable (no automatic connects to it) - * @note Networks are reachable by default - */ -void SetReachable(enum Network net, bool reachable); -/** @returns true if the network is reachable, false otherwise */ -bool IsReachable(enum Network net); -/** @returns true if the address is in a reachable network, false otherwise */ -bool IsReachable(const CNetAddr& addr); - bool AddLocal(const CService& addr, int nScore = LOCAL_NONE); bool AddLocal(const CNetAddr& addr, int nScore = LOCAL_NONE); void RemoveLocal(const CService& addr); |