@@ -94,7 +94,7 @@ void TorControlConnection::readcb(struct bufferevent *bev, void *ctx)
9494 self->reply_handlers .front ()(*self, self->message );
9595 self->reply_handlers .pop_front ();
9696 } else {
97- LogPrint (BCLog::TOR, " tor: Received unexpected sync reply %i\n " , self->message .code );
97+ LogPrint (BCLog::TOR, " Received unexpected sync reply %i\n " , self->message .code );
9898 }
9999 }
100100 self->message .Clear ();
@@ -113,13 +113,13 @@ void TorControlConnection::eventcb(struct bufferevent *bev, short what, void *ct
113113{
114114 TorControlConnection *self = static_cast <TorControlConnection*>(ctx);
115115 if (what & BEV_EVENT_CONNECTED) {
116- LogPrint (BCLog::TOR, " tor: Successfully connected!\n " );
116+ LogPrint (BCLog::TOR, " Successfully connected!\n " );
117117 self->connected (*self);
118118 } else if (what & (BEV_EVENT_EOF|BEV_EVENT_ERROR)) {
119119 if (what & BEV_EVENT_ERROR) {
120- LogPrint (BCLog::TOR, " tor: Error connecting to Tor control socket\n " );
120+ LogPrint (BCLog::TOR, " Error connecting to Tor control socket\n " );
121121 } else {
122- LogPrint (BCLog::TOR, " tor: End of stream\n " );
122+ LogPrint (BCLog::TOR, " End of stream\n " );
123123 }
124124 self->Disconnect ();
125125 self->disconnected (*self);
@@ -318,7 +318,7 @@ TorController::TorController(struct event_base* _base, const std::string& tor_co
318318 // Read service private key if cached
319319 std::pair<bool ,std::string> pkf = ReadBinaryFile (GetPrivateKeyFile ());
320320 if (pkf.first ) {
321- LogPrint (BCLog::TOR, " tor: Reading cached private key from %s\n " , fs::PathToString (GetPrivateKeyFile ()));
321+ LogPrint (BCLog::TOR, " Reading cached private key from %s\n " , fs::PathToString (GetPrivateKeyFile ()));
322322 private_key = pkf.second ;
323323 }
324324}
@@ -359,7 +359,7 @@ void TorController::get_socks_cb(TorControlConnection& _conn, const TorControlRe
359359 }
360360 }
361361 if (!socks_location.empty ()) {
362- LogPrint (BCLog::TOR, " tor: Get SOCKS port command yielded %s\n " , socks_location);
362+ LogPrint (BCLog::TOR, " Get SOCKS port command yielded %s\n " , socks_location);
363363 } else {
364364 LogPrintf (" tor: Get SOCKS port command returned nothing\n " );
365365 }
@@ -380,7 +380,7 @@ void TorController::get_socks_cb(TorControlConnection& _conn, const TorControlRe
380380 }
381381
382382 Assume (resolved.IsValid ());
383- LogPrint (BCLog::TOR, " tor: Configuring onion proxy for %s\n " , resolved.ToStringIPPort ());
383+ LogPrint (BCLog::TOR, " Configuring onion proxy for %s\n " , resolved.ToStringIPPort ());
384384 Proxy addrOnion = Proxy (resolved, true );
385385 SetProxy (NET_ONION, addrOnion);
386386
@@ -404,7 +404,7 @@ void TorController::get_socks_cb(TorControlConnection& _conn, const TorControlRe
404404void TorController::add_onion_cb (TorControlConnection& _conn, const TorControlReply& reply)
405405{
406406 if (reply.code == 250 ) {
407- LogPrint (BCLog::TOR, " tor: ADD_ONION successful\n " );
407+ LogPrint (BCLog::TOR, " ADD_ONION successful\n " );
408408 for (const std::string &s : reply.lines ) {
409409 std::map<std::string,std::string> m = ParseTorReplyMapping (s);
410410 std::map<std::string,std::string>::iterator i;
@@ -423,7 +423,7 @@ void TorController::add_onion_cb(TorControlConnection& _conn, const TorControlRe
423423 service = LookupNumeric (std::string (service_id+" .onion" ), Params ().GetDefaultPort ());
424424 LogPrintf (" tor: Got service ID %s, advertising service %s\n " , service_id, service.ToString ());
425425 if (WriteBinaryFile (GetPrivateKeyFile (), private_key)) {
426- LogPrint (BCLog::TOR, " tor: Cached service private key to %s\n " , fs::PathToString (GetPrivateKeyFile ()));
426+ LogPrint (BCLog::TOR, " Cached service private key to %s\n " , fs::PathToString (GetPrivateKeyFile ()));
427427 } else {
428428 LogPrintf (" tor: Error writing service private key to %s\n " , fs::PathToString (GetPrivateKeyFile ()));
429429 }
@@ -439,7 +439,7 @@ void TorController::add_onion_cb(TorControlConnection& _conn, const TorControlRe
439439void TorController::auth_cb (TorControlConnection& _conn, const TorControlReply& reply)
440440{
441441 if (reply.code == 250 ) {
442- LogPrint (BCLog::TOR, " tor: Authentication successful\n " );
442+ LogPrint (BCLog::TOR, " Authentication successful\n " );
443443
444444 // Now that we know Tor is running setup the proxy for onion addresses
445445 // if -onion isn't set to something else.
@@ -490,7 +490,7 @@ static std::vector<uint8_t> ComputeResponse(const std::string &key, const std::v
490490void TorController::authchallenge_cb (TorControlConnection& _conn, const TorControlReply& reply)
491491{
492492 if (reply.code == 250 ) {
493- LogPrint (BCLog::TOR, " tor: SAFECOOKIE authentication challenge successful\n " );
493+ LogPrint (BCLog::TOR, " SAFECOOKIE authentication challenge successful\n " );
494494 std::pair<std::string,std::string> l = SplitTorReplyLine (reply.lines [0 ]);
495495 if (l.first == " AUTHCHALLENGE" ) {
496496 std::map<std::string,std::string> m = ParseTorReplyMapping (l.second );
@@ -500,7 +500,7 @@ void TorController::authchallenge_cb(TorControlConnection& _conn, const TorContr
500500 }
501501 std::vector<uint8_t > serverHash = ParseHex (m[" SERVERHASH" ]);
502502 std::vector<uint8_t > serverNonce = ParseHex (m[" SERVERNONCE" ]);
503- LogPrint (BCLog::TOR, " tor: AUTHCHALLENGE ServerHash %s ServerNonce %s\n " , HexStr (serverHash), HexStr (serverNonce));
503+ LogPrint (BCLog::TOR, " AUTHCHALLENGE ServerHash %s ServerNonce %s\n " , HexStr (serverHash), HexStr (serverNonce));
504504 if (serverNonce.size () != 32 ) {
505505 LogPrintf (" tor: ServerNonce is not 32 bytes, as required by spec\n " );
506506 return ;
@@ -547,12 +547,12 @@ void TorController::protocolinfo_cb(TorControlConnection& _conn, const TorContro
547547 std::map<std::string,std::string> m = ParseTorReplyMapping (l.second );
548548 std::map<std::string,std::string>::iterator i;
549549 if ((i = m.find (" Tor" )) != m.end ()) {
550- LogPrint (BCLog::TOR, " tor: Connected to Tor version %s\n " , i->second );
550+ LogPrint (BCLog::TOR, " Connected to Tor version %s\n " , i->second );
551551 }
552552 }
553553 }
554554 for (const std::string &s : methods) {
555- LogPrint (BCLog::TOR, " tor: Supported authentication method: %s\n " , s);
555+ LogPrint (BCLog::TOR, " Supported authentication method: %s\n " , s);
556556 }
557557 // Prefer NULL, otherwise SAFECOOKIE. If a password is provided, use HASHEDPASSWORD
558558 /* Authentication:
@@ -562,18 +562,18 @@ void TorController::protocolinfo_cb(TorControlConnection& _conn, const TorContro
562562 std::string torpassword = gArgs .GetArg (" -torpassword" , " " );
563563 if (!torpassword.empty ()) {
564564 if (methods.count (" HASHEDPASSWORD" )) {
565- LogPrint (BCLog::TOR, " tor: Using HASHEDPASSWORD authentication\n " );
565+ LogPrint (BCLog::TOR, " Using HASHEDPASSWORD authentication\n " );
566566 ReplaceAll (torpassword, " \" " , " \\\" " );
567567 _conn.Command (" AUTHENTICATE \" " + torpassword + " \" " , std::bind (&TorController::auth_cb, this , std::placeholders::_1, std::placeholders::_2));
568568 } else {
569569 LogPrintf (" tor: Password provided with -torpassword, but HASHEDPASSWORD authentication is not available\n " );
570570 }
571571 } else if (methods.count (" NULL" )) {
572- LogPrint (BCLog::TOR, " tor: Using NULL authentication\n " );
572+ LogPrint (BCLog::TOR, " Using NULL authentication\n " );
573573 _conn.Command (" AUTHENTICATE" , std::bind (&TorController::auth_cb, this , std::placeholders::_1, std::placeholders::_2));
574574 } else if (methods.count (" SAFECOOKIE" )) {
575575 // Cookie: hexdump -e '32/1 "%02x""\n"' ~/.tor/control_auth_cookie
576- LogPrint (BCLog::TOR, " tor: Using SAFECOOKIE authentication, reading cookie authentication from %s\n " , cookiefile);
576+ LogPrint (BCLog::TOR, " Using SAFECOOKIE authentication, reading cookie authentication from %s\n " , cookiefile);
577577 std::pair<bool ,std::string> status_cookie = ReadBinaryFile (fs::PathFromString (cookiefile), TOR_COOKIE_SIZE);
578578 if (status_cookie.first && status_cookie.second .size () == TOR_COOKIE_SIZE) {
579579 // _conn.Command("AUTHENTICATE " + HexStr(status_cookie.second), std::bind(&TorController::auth_cb, this, std::placeholders::_1, std::placeholders::_2));
@@ -615,7 +615,7 @@ void TorController::disconnected_cb(TorControlConnection& _conn)
615615 if (!reconnect)
616616 return ;
617617
618- LogPrint (BCLog::TOR, " tor: Not connected to Tor control port %s, trying to reconnect\n " , m_tor_control_center);
618+ LogPrint (BCLog::TOR, " Not connected to Tor control port %s, trying to reconnect\n " , m_tor_control_center);
619619
620620 // Single-shot timer for reconnect. Use exponential backoff.
621621 struct timeval time = MillisToTimeval (int64_t (reconnect_timeout * 1000.0 ));
0 commit comments