MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / TorController

Method TorController

src/torcontrol.cpp:352–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352TorController::TorController(const std::string& tor_control_center, const CService& target)
353 : m_tor_control_center(tor_control_center),
354 m_conn(m_interrupt),
355 m_reconnect(true),
356 m_reconnect_timeout(RECONNECT_TIMEOUT_START),
357 m_target(target)
358{
359 // Read service private key if cached
360 std::pair<bool,std::string> pkf = ReadBinaryFile(GetPrivateKeyFile());
361 if (pkf.first) {
362 LogDebug(BCLog::TOR, "Reading cached private key from %s", fs::PathToString(GetPrivateKeyFile()));
363 m_private_key = pkf.second;
364 }
365 m_thread = std::thread(&util::TraceThread, "torcontrol", [this] { ThreadControl(); });
366}
367
368TorController::~TorController()
369{

Callers

nothing calls this directly

Calls 2

ReadBinaryFileFunction · 0.85
PathToStringFunction · 0.85

Tested by

no test coverage detected