From 3d390421440f1cae9a9f2b089561c183ecd1b073 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Thu, 27 May 2021 18:37:57 +0200 Subject: [PATCH] p2p: remove torv2 in SetIP() and ADDR_TORV2_SIZE constant --- src/netaddress.cpp | 2 +- src/netaddress.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/netaddress.cpp b/src/netaddress.cpp index 10b482fab36..11ad2141078 100644 --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -115,7 +115,7 @@ void CNetAddr::SetIP(const CNetAddr& ipIn) assert(ipIn.m_addr.size() == ADDR_IPV6_SIZE); break; case NET_ONION: - assert(ipIn.m_addr.size() == ADDR_TORV2_SIZE || ipIn.m_addr.size() == ADDR_TORV3_SIZE); + assert(ipIn.m_addr.size() == ADDR_TORV3_SIZE); break; case NET_I2P: assert(ipIn.m_addr.size() == ADDR_I2P_SIZE); diff --git a/src/netaddress.h b/src/netaddress.h index 6cf3afb15c2..0d04ab88fb7 100644 --- a/src/netaddress.h +++ b/src/netaddress.h @@ -97,9 +97,6 @@ static constexpr size_t ADDR_IPV4_SIZE = 4; /// Size of IPv6 address (in bytes). static constexpr size_t ADDR_IPV6_SIZE = 16; -/// Size of TORv2 address (in bytes). -static constexpr size_t ADDR_TORV2_SIZE = 10; - /// Size of TORv3 address (in bytes). This is the length of just the address /// as used in BIP155, without the checksum and the version byte. static constexpr size_t ADDR_TORV3_SIZE = 32;