Skip to content

Commit c56a1c9

Browse files
committed
p2p: drop onions from IsAddrV1Compatible(), no longer relay torv2
1 parent f8e9400 commit c56a1c9

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/netaddress.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,6 @@ bool CNetAddr::IsAddrV1Compatible() const
522522
case NET_INTERNAL:
523523
return true;
524524
case NET_ONION:
525-
return m_addr.size() == ADDR_TORV2_SIZE;
526525
case NET_I2P:
527526
case NET_CJDNS:
528527
return false;

src/test/net_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ BOOST_AUTO_TEST_CASE(cnetaddr_unserialize_v2)
613613
s >> addr;
614614
BOOST_CHECK(addr.IsValid());
615615
BOOST_CHECK(addr.IsTor());
616-
BOOST_CHECK(addr.IsAddrV1Compatible());
616+
BOOST_CHECK(!addr.IsAddrV1Compatible());
617617
BOOST_CHECK_EQUAL(addr.ToString(), "6hzph5hv6337r6p2.onion");
618618
BOOST_REQUIRE(s.empty());
619619

0 commit comments

Comments
 (0)