diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2023-02-07 13:30:37 +0100 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2023-10-05 15:10:34 +0200 |
commit | 6e308651c441cbf8763c67cc099c538c333c2872 (patch) | |
tree | 7d4ddc4737c3a19fcb560fc33fe9bfbea56b7f35 /src/torcontrol.cpp | |
parent | c42ded3d9bda8b273780a4a81490bbf1b9e9c261 (diff) | |
download | bitcoin-6e308651c441cbf8763c67cc099c538c333c2872.tar.xz |
net: move IsReachable() code to netbase and encapsulate it
`vfLimited`, `IsReachable()`, `SetReachable()` need not be in the `net`
module. Move them to `netbase` because they will be needed in
`LookupSubNet()` to possibly flip the result to CJDNS (if that network
is reachable).
In the process, encapsulate them in a class.
`NET_UNROUTABLE` and `NET_INTERNAL` are no longer ignored when adding
or removing reachable networks. This was unnecessary.
Diffstat (limited to 'src/torcontrol.cpp')
-rw-r--r-- | src/torcontrol.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp index 4c99aa5746..60cf31a964 100644 --- a/src/torcontrol.cpp +++ b/src/torcontrol.cpp @@ -409,7 +409,7 @@ void TorController::get_socks_cb(TorControlConnection& _conn, const TorControlRe // // If NET_ONION is not reachable, then none of -proxy or -onion was given. // Since we are here, then -torcontrol and -torpassword were given. - SetReachable(NET_ONION, true); + g_reachable_nets.Add(NET_ONION); } } |