MCPcopy Create free account
hub / github.com/ElementsProject/elements / IsPeerAddrLocalGood

Function IsPeerAddrLocalGood

src/net.cpp:228–233  ·  view source on GitHub ↗

Is our peer's addrLocal potentially useful as an external IP source?

Source from the content-addressed store, hash-verified

226
227// Is our peer's addrLocal potentially useful as an external IP source?
228bool IsPeerAddrLocalGood(CNode *pnode)
229{
230 CService addrLocal = pnode->GetAddrLocal();
231 return fDiscover && pnode->addr.IsRoutable() && addrLocal.IsRoutable() &&
232 IsReachable(addrLocal.GetNetwork());
233}
234
235std::optional<CAddress> GetLocalAddrForPeer(CNode *pnode)
236{

Callers 2

ProcessMessageMethod · 0.85
GetLocalAddrForPeerFunction · 0.85

Calls 4

IsReachableFunction · 0.85
GetAddrLocalMethod · 0.80
IsRoutableMethod · 0.80
GetNetworkMethod · 0.80

Tested by

no test coverage detected