From f906e9ecd06f24f21a3c6c0c5085c5718f78b2ab Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Sat, 25 Apr 2026 12:12:58 +0200 Subject: [PATCH] Fixed CI --- cppcheck/suppressions.txt | 1 + src/p2p_server.cpp | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cppcheck/suppressions.txt b/cppcheck/suppressions.txt index 9cc7320..93de6fd 100644 --- a/cppcheck/suppressions.txt +++ b/cppcheck/suppressions.txt @@ -2,3 +2,4 @@ unmatchedSuppression missingIncludeSystem unusedFunction useStlAlgorithm +funcArgNamesDifferentUnnamed diff --git a/src/p2p_server.cpp b/src/p2p_server.cpp index 3a16a48..5926a7d 100644 --- a/src/p2p_server.cpp +++ b/src/p2p_server.cpp @@ -2402,12 +2402,11 @@ bool P2PServer::P2PClient::send_handshake_challenge() bool is_tor = false; - if ((m_addressType == AddressType::DomainName) && (strstr(m_addrString, ".onion:"))) { - // We're connecting to an .onion address - is_tor = true; - } - else if (!owner->m_pool->params().m_onionPubkey.empty() && m_isIncoming && (m_addressType != AddressType::DomainName) && m_addr.is_localhost()) { - // We published our .onion address, and it's an incoming connection on localhost interface, so it's likely an incoming tor connection + if (((m_addressType == AddressType::DomainName) && (strstr(m_addrString, ".onion:"))) || + (!owner->m_pool->params().m_onionPubkey.empty() && m_isIncoming && (m_addressType != AddressType::DomainName) && m_addr.is_localhost())) + { + // 1) We're connecting to an .onion address + // 2) We published our .onion address, and it's an incoming connection on localhost interface, so it's likely an incoming tor connection is_tor = true; }