From 1d631e956fffbbc7891ed40be4fd39aeff036c52 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Wed, 26 May 2021 16:34:39 +0200 Subject: [PATCH] p2p: remove BIP155Network::TORV2 from GetBIP155Network() --- src/netaddress.cpp | 9 +-------- src/netaddress.h | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/netaddress.cpp b/src/netaddress.cpp index 4b4094fc25a..5d1f3e2652e 100644 --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -32,14 +32,7 @@ CNetAddr::BIP155Network CNetAddr::GetBIP155Network() const case NET_IPV6: return BIP155Network::IPV6; case NET_ONION: - switch (m_addr.size()) { - case ADDR_TORV2_SIZE: - return BIP155Network::TORV2; - case ADDR_TORV3_SIZE: - return BIP155Network::TORV3; - default: - assert(false); - } + return BIP155Network::TORV3; case NET_I2P: return BIP155Network::I2P; case NET_CJDNS: diff --git a/src/netaddress.h b/src/netaddress.h index 63580c57449..fc709cf044f 100644 --- a/src/netaddress.h +++ b/src/netaddress.h @@ -302,7 +302,7 @@ class CNetAddr /** * Get the BIP155 network id of this address. * Must not be called for IsInternal() objects. - * @returns BIP155 network id + * @returns BIP155 network id, except TORV2 which is no longer supported. */ BIP155Network GetBIP155Network() const;