mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
p2p: drop onions from IsAddrV1Compatible(), no longer relay torv2
This commit is contained in:
parent
f8e94002fc
commit
c56a1c9b18
2 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue