Skip to content

Commit 1d631e9

Browse files
committed
p2p: remove BIP155Network::TORV2 from GetBIP155Network()
1 parent 7d1769b commit 1d631e9

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/netaddress.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,7 @@ CNetAddr::BIP155Network CNetAddr::GetBIP155Network() const
3232
case NET_IPV6:
3333
return BIP155Network::IPV6;
3434
case NET_ONION:
35-
switch (m_addr.size()) {
36-
case ADDR_TORV2_SIZE:
37-
return BIP155Network::TORV2;
38-
case ADDR_TORV3_SIZE:
39-
return BIP155Network::TORV3;
40-
default:
41-
assert(false);
42-
}
35+
return BIP155Network::TORV3;
4336
case NET_I2P:
4437
return BIP155Network::I2P;
4538
case NET_CJDNS:

src/netaddress.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ class CNetAddr
302302
/**
303303
* Get the BIP155 network id of this address.
304304
* Must not be called for IsInternal() objects.
305-
* @returns BIP155 network id
305+
* @returns BIP155 network id, except TORV2 which is no longer supported.
306306
*/
307307
BIP155Network GetBIP155Network() const;
308308

0 commit comments

Comments
 (0)