diff --git a/src/net.cpp b/src/net.cpp index d046c2a2722..c903afc653f 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -274,7 +274,7 @@ void ClearLocal() } // learn a new local address -bool AddLocal(const CService& addr_, int nScore) +bool AddLocal(const CService& addr_, int nScore, bool add_even_if_unreachable) { CService addr{MaybeFlipIPv6toCJDNS(addr_)}; @@ -304,9 +304,9 @@ bool AddLocal(const CService& addr_, int nScore) return true; } -bool AddLocal(const CNetAddr &addr, int nScore) +bool AddLocal(const CNetAddr& addr, int nScore, bool add_even_if_unreachable) { - return AddLocal(CService(addr, GetListenPort()), nScore); + return AddLocal(CService(addr, GetListenPort()), nScore, add_even_if_unreachable); } void RemoveLocal(const CService& addr) diff --git a/src/net.h b/src/net.h index 928d518eda6..62e97b48944 100644 --- a/src/net.h +++ b/src/net.h @@ -164,8 +164,8 @@ enum std::optional GetLocalAddrForPeer(CNode& node); void ClearLocal(); -bool AddLocal(const CService& addr, int nScore = LOCAL_NONE); -bool AddLocal(const CNetAddr& addr, int nScore = LOCAL_NONE); +bool AddLocal(const CService& addr, int nScore = LOCAL_NONE, bool add_even_if_unreachable = false); +bool AddLocal(const CNetAddr& addr, int nScore = LOCAL_NONE, bool add_even_if_unreachable = false); void RemoveLocal(const CService& addr); bool SeenLocal(const CService& addr); bool IsLocal(const CService& addr);