mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Add -tor and related configuration
This commit is contained in:
12
src/net.cpp
12
src/net.cpp
@@ -206,6 +206,14 @@ void static AdvertizeLocal()
|
||||
}
|
||||
}
|
||||
|
||||
void SetReachable(enum Network net, bool fFlag)
|
||||
{
|
||||
LOCK(cs_mapLocalHost);
|
||||
vfReachable[net] = fFlag;
|
||||
if (net == NET_IPV6 && fFlag)
|
||||
vfReachable[NET_IPV4] = true;
|
||||
}
|
||||
|
||||
// learn a new local address
|
||||
bool AddLocal(const CService& addr, int nScore)
|
||||
{
|
||||
@@ -228,9 +236,7 @@ bool AddLocal(const CService& addr, int nScore)
|
||||
info.nScore = nScore;
|
||||
info.nPort = addr.GetPort() + (fAlready ? 1 : 0);
|
||||
}
|
||||
enum Network net = addr.GetNetwork();
|
||||
vfReachable[net] = true;
|
||||
if (net == NET_IPV6) vfReachable[NET_IPV4] = true;
|
||||
SetReachable(addr.GetNetwork());
|
||||
}
|
||||
|
||||
AdvertizeLocal();
|
||||
|
||||
Reference in New Issue
Block a user