From 53afa68026ffa1313ae4aba3664de7791d23b1c8 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 7 Feb 2023 15:13:21 +0100 Subject: net: move MaybeFlipIPv6toCJDNS() from net to netbase It need not be in the `net` module and we need to call it from `LookupSubNet()`, thus move it to `netbase`. --- src/net.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/net.cpp') diff --git a/src/net.cpp b/src/net.cpp index d20d185e27..cc4c676822 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -269,22 +269,6 @@ std::optional GetLocalAddrForPeer(CNode& node) return std::nullopt; } -/** - * If an IPv6 address belongs to the address range used by the CJDNS network and - * the CJDNS network is reachable (-cjdnsreachable config is set), then change - * the type from NET_IPV6 to NET_CJDNS. - * @param[in] service Address to potentially convert. - * @return a copy of `service` either unmodified or changed to CJDNS. - */ -CService MaybeFlipIPv6toCJDNS(const CService& service) -{ - CService ret{service}; - if (ret.IsIPv6() && ret.HasCJDNSPrefix() && g_reachable_nets.Contains(NET_CJDNS)) { - ret.m_net = NET_CJDNS; - } - return ret; -} - // learn a new local address bool AddLocal(const CService& addr_, int nScore) { -- cgit v1.2.3