diff --git a/llarp/dht/messages/pubintro.cpp b/llarp/dht/messages/pubintro.cpp index b36f9b342..b80424fc7 100644 --- a/llarp/dht/messages/pubintro.cpp +++ b/llarp/dht/messages/pubintro.cpp @@ -57,8 +57,7 @@ namespace llarp llarp_dht_context* ctx, std::vector>& replies) const { const auto now = ctx->impl->Now(); - const llarp::dht::Key_t addr(introset.derivedSigningKey); - const auto keyStr = addr.ToHex(); + const llarp::dht::Key_t addr{introset.derivedSigningKey.data()}; auto router = ctx->impl->GetRouter(); router->NotifyRouterEvent( @@ -134,7 +133,7 @@ namespace llarp return true; } - llarp::LogInfo("Relaying PublishIntroMessage for ", keyStr, ", txid=", txID); + llarp::LogInfo("Relaying PublishIntroMessage for ", addr, ", txid=", txID); propagateIfNotUs(relayOrder); } @@ -156,7 +155,7 @@ namespace llarp { LogInfo( "Received PubIntro for ", - keyStr, + addr, ", txid=", txID, " and we are candidate ", @@ -169,7 +168,7 @@ namespace llarp LogWarn( "!!! Received PubIntro with relayed==false but we aren't" " candidate, intro derived key: ", - keyStr, + addr, ", txid=", txID, ", message from: ", diff --git a/llarp/net/sock_addr.cpp b/llarp/net/sock_addr.cpp index b0ed8f2eb..1a2d9c046 100644 --- a/llarp/net/sock_addr.cpp +++ b/llarp/net/sock_addr.cpp @@ -209,7 +209,11 @@ namespace llarp bool SockAddr::operator<(const SockAddr& other) const { - return (m_addr.sin6_addr.s6_addr < other.m_addr.sin6_addr.s6_addr); + return memcmp( + m_addr.sin6_addr.s6_addr, + other.m_addr.sin6_addr.s6_addr, + sizeof(m_addr.sin6_addr.s6_addr)) + < 0; } bool