p2p: drop onions from IsAddrV1Compatible(), no longer relay torv2

pull/826/head
Jon Atack 4 years ago
parent f8e94002fc
commit c56a1c9b18
No known key found for this signature in database
GPG Key ID: 4F5721B3D0E3921D

@ -522,7 +522,6 @@ bool CNetAddr::IsAddrV1Compatible() const
case NET_INTERNAL:
return true;
case NET_ONION:
return m_addr.size() == ADDR_TORV2_SIZE;
case NET_I2P:
case NET_CJDNS:
return false;

@ -613,7 +613,7 @@ BOOST_AUTO_TEST_CASE(cnetaddr_unserialize_v2)
s >> addr;
BOOST_CHECK(addr.IsValid());
BOOST_CHECK(addr.IsTor());
BOOST_CHECK(addr.IsAddrV1Compatible());
BOOST_CHECK(!addr.IsAddrV1Compatible());
BOOST_CHECK_EQUAL(addr.ToString(), "6hzph5hv6337r6p2.onion");
BOOST_REQUIRE(s.empty());

Loading…
Cancel
Save