* 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. */
| 275 | * @return a copy of `service` either unmodified or changed to CJDNS. |
| 276 | */ |
| 277 | CService MaybeFlipIPv6toCJDNS(const CService& service) |
| 278 | { |
| 279 | CService ret{service}; |
| 280 | if (ret.m_net == NET_IPV6 && ret.m_addr[0] == 0xfc && IsReachable(NET_CJDNS)) { |
| 281 | ret.m_net = NET_CJDNS; |
| 282 | } |
| 283 | return ret; |
| 284 | } |
| 285 | |
| 286 | // learn a new local address |
| 287 | bool AddLocal(const CService& addr_, int nScore) |
no test coverage detected