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`.
This commit is contained in:
Vasil Dimov
2023-02-07 15:13:21 +01:00
parent 6e308651c4
commit 53afa68026
4 changed files with 18 additions and 18 deletions

View File

@@ -774,3 +774,12 @@ bool IsBadPort(uint16_t port)
}
return false;
}
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;
}