mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
doc, refactor: Changing -torcontrol help to specify that a default port is used
Right now when we get the help for -torcontrol it says that there is a default ip and port we dont specify if there is a specified ip that we would also use port 9051 as default
This commit is contained in:
@@ -42,8 +42,8 @@
|
||||
#include <event2/thread.h>
|
||||
#include <event2/util.h>
|
||||
|
||||
/** Default control port */
|
||||
const std::string DEFAULT_TOR_CONTROL = "127.0.0.1:9051";
|
||||
/** Default control ip and port */
|
||||
const std::string DEFAULT_TOR_CONTROL = "127.0.0.1:" + ToString(DEFAULT_TOR_CONTROL_PORT);
|
||||
/** Tor cookie size (from control-spec.txt) */
|
||||
static const int TOR_COOKIE_SIZE = 32;
|
||||
/** Size of client/server nonce for SAFECOOKIE */
|
||||
@@ -144,7 +144,7 @@ bool TorControlConnection::Connect(const std::string& tor_control_center, const
|
||||
Disconnect();
|
||||
}
|
||||
|
||||
const std::optional<CService> control_service{Lookup(tor_control_center, 9051, fNameLookup)};
|
||||
const std::optional<CService> control_service{Lookup(tor_control_center, DEFAULT_TOR_CONTROL_PORT, fNameLookup)};
|
||||
if (!control_service.has_value()) {
|
||||
LogPrintf("tor: Failed to look up control center %s\n", tor_control_center);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user