diff options
author | wodry <wodry@users.noreply.github.com> | 2018-07-02 11:37:59 +0200 |
---|---|---|
committer | wodry <wodry@users.noreply.github.com> | 2018-07-02 16:41:13 +0200 |
commit | 07c493f2d1053d6a1c7d0ca1650da7b6f94c8948 (patch) | |
tree | b5665cf7a662eff21e3052d861da285fe9fea43a /src/netaddress.cpp | |
parent | 686e97a0c7358291d628213447cf33e99cde7ce8 (diff) |
scripted-diff: Replace NET_TOR with NET_ONION
-BEGIN VERIFY SCRIPT-
sed --in-place'' --expression='s/NET_TOR/NET_ONION/g' $(git grep -I --files-with-matches 'NET_TOR')
-END VERIFY SCRIPT-
The --in-place'' hack is required for sed on macOS to edit files in-place without passing a backup extension.
Diffstat (limited to 'src/netaddress.cpp')
-rw-r--r-- | src/netaddress.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/netaddress.cpp b/src/netaddress.cpp index 18d5948f85..5ccbabd03d 100644 --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -246,7 +246,7 @@ enum Network CNetAddr::GetNetwork() const return NET_IPV4; if (IsTor()) - return NET_TOR; + return NET_ONION; return NET_IPV6; } @@ -355,7 +355,7 @@ std::vector<unsigned char> CNetAddr::GetGroup() const } else if (IsTor()) { - nClass = NET_TOR; + nClass = NET_ONION; nStartByte = 6; nBits = 4; } @@ -433,11 +433,11 @@ int CNetAddr::GetReachabilityFrom(const CNetAddr *paddrPartner) const case NET_IPV4: return REACH_IPV4; case NET_IPV6: return fTunnel ? REACH_IPV6_WEAK : REACH_IPV6_STRONG; // only prefer giving our IPv6 address if it's not tunnelled } - case NET_TOR: + case NET_ONION: switch(ourNet) { default: return REACH_DEFAULT; case NET_IPV4: return REACH_IPV4; // Tor users can connect to IPv4 as well - case NET_TOR: return REACH_PRIVATE; + case NET_ONION: return REACH_PRIVATE; } case NET_TEREDO: switch(ourNet) { @@ -454,7 +454,7 @@ int CNetAddr::GetReachabilityFrom(const CNetAddr *paddrPartner) const case NET_TEREDO: return REACH_TEREDO; case NET_IPV6: return REACH_IPV6_WEAK; case NET_IPV4: return REACH_IPV4; - case NET_TOR: return REACH_PRIVATE; // either from Tor, or don't care about our address + case NET_ONION: return REACH_PRIVATE; // either from Tor, or don't care about our address } } } |