Limited relaying/storing of foreign addresses

Introduce a boolean variable for each "network" (ipv4, ipv6, tor, i2p),
and track whether we are likely to able to connect to it. Addresses in
"addr" messages outside of our network get limited relaying and are not
stored in addrman.
This commit is contained in:
Pieter Wuille
2012-04-10 20:22:04 +02:00
parent d32148567f
commit 090e5b40f1
5 changed files with 60 additions and 4 deletions

View File

@@ -58,8 +58,10 @@ bool AddLocal(const CNetAddr& addr, int nScore = LOCAL_NONE);
bool SeenLocal(const CNetAddr& addr);
bool IsLocal(const CNetAddr& addr);
bool GetLocal(CNetAddr &addr, const CNetAddr *paddrPeer = NULL);
bool IsReachable(const CNetAddr &addr);
CAddress GetLocalAddress(const CNetAddr *paddrPeer = NULL);
enum
{
MSG_TX = 1,