aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/netaddress.cpp
diff options
context:
space:
mode:
authorW. J. van der Laan <laanwj@protonmail.com>2021-07-08 16:52:25 +0200
committerW. J. van der Laan <laanwj@protonmail.com>2021-07-08 17:20:35 +0200
commitd9686164220041b8839039732295f165d9e5d015 (patch)
tree9de408d5f1ef01cb18f1eca91a979b8fed4952ec /src/test/fuzz/netaddress.cpp
parent4129134e844f78a89f8515cf30dad4b6074703c7 (diff)
parent00b875ba9414463d0041da6924fd9b54d6a06dee (diff)
downloadbitcoin-d9686164220041b8839039732295f165d9e5d015.tar.xz
Merge bitcoin/bitcoin#22179: Torv2 removal followups
00b875ba9414463d0041da6924fd9b54d6a06dee addrman: remove invalid addresses when unserializing (Vasil Dimov) bdb62096f0109b2ec76849d33d6cf7187dea299f fuzz: reduce possible networks check (Vasil Dimov) a164cd3ba694ffeba03b2887a411b7f82f6c087e net: simplify CNetAddr::IsRoutable() (Vasil Dimov) Pull request description: * Simplify some code, now that we know `CNetAddr::IsRFC4193()` and `CNetAddr::IsTor()` cannot be `true` at the same time. * Drop Tor v2 addresses when loading addrman from `peers.dat` - they would have been loaded as dummy-all-zeros IPv6 addresses and linger in addrman, wasting space. ACKs for top commit: sipa: ACK 00b875ba9414463d0041da6924fd9b54d6a06dee. Reviewed the code, and tested with -DDEBUG_ADDRMAN (unit tests + mainnet run with peers.dat that contained v2 onions). laanwj: Code review and lightly tested ACK 00b875ba9414463d0041da6924fd9b54d6a06dee jonatack: ACK 00b875ba9414463d0041da6924fd9b54d6a06dee reviewed, debug-built with -DEBUG_ADDRMAN rebased to current master, restarted node on mainnet/signet/testnet and verified that on each chain -addrinfo shows no change in address counts (as expected). Added some sanity check asserts, rebuilt/re-ran test. Checked that the new test fails on master with "test/addrman_tests.cpp(824): error: in "addrman_tests/remove_invalid": check addrman.size() == 2 has failed [4 != 2]" jarolrod: ACK 00b875ba9414463d0041da6924fd9b54d6a06dee Tree-SHA512: 6ed8e6745134b1b94fffaba28482de909ea39483b46b7f57bda61cdbae7a51251d15cb674de3631772fbeabe153d77a19269f96e62a89102a2d5c01e48f0ba06
Diffstat (limited to 'src/test/fuzz/netaddress.cpp')
-rw-r--r--src/test/fuzz/netaddress.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/fuzz/netaddress.cpp b/src/test/fuzz/netaddress.cpp
index f9d8129ca9..6cb81901cb 100644
--- a/src/test/fuzz/netaddress.cpp
+++ b/src/test/fuzz/netaddress.cpp
@@ -54,7 +54,7 @@ FUZZ_TARGET(netaddress)
(void)net_addr.IsRFC3927();
(void)net_addr.IsRFC3964();
if (net_addr.IsRFC4193()) {
- assert(net_addr.GetNetwork() == Network::NET_ONION || net_addr.GetNetwork() == Network::NET_INTERNAL || net_addr.GetNetwork() == Network::NET_UNROUTABLE);
+ assert(net_addr.GetNetwork() == Network::NET_INTERNAL || net_addr.GetNetwork() == Network::NET_UNROUTABLE);
}
(void)net_addr.IsRFC4380();
(void)net_addr.IsRFC4843();