aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2021-05-24 17:39:31 +0200
committerJon Atack <jon@atack.com>2021-06-03 13:36:44 +0200
commitcff5ec477a388ae9aa9fd9ef6a7dad1f678e7d23 (patch)
tree042100a878a5aff661efe2da4d7d052b0969e83e /src
parent4192a74413907717d6173e393724b931f2225dd9 (diff)
p2p: remove pre-addrv2 onions from SerializeV1Array()
Diffstat (limited to 'src')
-rw-r--r--src/netaddress.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/netaddress.h b/src/netaddress.h
index fc709cf044..6cf3afb15c 100644
--- a/src/netaddress.h
+++ b/src/netaddress.h
@@ -333,23 +333,14 @@ class CNetAddr
memcpy(arr, IPV4_IN_IPV6_PREFIX.data(), prefix_size);
memcpy(arr + prefix_size, m_addr.data(), m_addr.size());
return;
- case NET_ONION:
- if (m_addr.size() == ADDR_TORV3_SIZE) {
- break;
- }
- prefix_size = sizeof(TORV2_IN_IPV6_PREFIX);
- assert(prefix_size + m_addr.size() == sizeof(arr));
- memcpy(arr, TORV2_IN_IPV6_PREFIX.data(), prefix_size);
- memcpy(arr + prefix_size, m_addr.data(), m_addr.size());
- return;
case NET_INTERNAL:
prefix_size = sizeof(INTERNAL_IN_IPV6_PREFIX);
assert(prefix_size + m_addr.size() == sizeof(arr));
memcpy(arr, INTERNAL_IN_IPV6_PREFIX.data(), prefix_size);
memcpy(arr + prefix_size, m_addr.data(), m_addr.size());
return;
+ case NET_ONION:
case NET_I2P:
- break;
case NET_CJDNS:
break;
case NET_UNROUTABLE:
@@ -357,7 +348,7 @@ class CNetAddr
assert(false);
} // no default case, so the compiler can warn about missing cases
- // Serialize TORv3, I2P and CJDNS as all-zeros.
+ // Serialize ONION, I2P and CJDNS as all-zeros.
memset(arr, 0x0, V1_SERIALIZATION_SIZE);
}