mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
ba8ab4fc54test: cover addrv2 support in anchors.dat with a TorV3 address (Matthew Zipkin)b4bee4bbf4test: add keep_alive option to socks5 proxy in test_framework (Matthew Zipkin)5aaf988ccctest: cover TorV3 address in p2p_addrv2_relay (Matthew Zipkin)80f64a3d40test: add support for all networks in CAddress in messages.py (brunoerg) Pull request description: Closes https://github.com/bitcoin/bitcoin/issues/27140 Adds test coverage for https://github.com/bitcoin/bitcoin/pull/20516 to ensure that https://github.com/bitcoin/bitcoin/issues/20511 is completed and may be closed. This PR adds a test case to `feature_anchors.py` where an onion v3 address is set as a blocks-only relay peer and then shutdown, ensuring that the address is saved to anchors.dat in addrv2 format. We then ensure that bitcoin attempts to reconnect to that anchor address on restart. To compute the addrv2 serialization of the onion v3 address, I added logic to `CAddress` in `messages.py`. This new logic is covered by extending `p2p_addrv2_relay.py` to include an onion v3 address. Future work will be adding coverage for ipv6, torv2 and cjdns in these modules and also `feature_proxy.py` Also includes de/serialization unit test for `CAddress` in test framework. ACKs for top commit: jonatack: ACKba8ab4fc54brunoerg: crACKba8ab4fc54willcl-ark: ACKba8ab4fc54Tree-SHA512: 7220e30d7cb975903d9ac575a7215a08e8f784c24c5741561affcbde12fb92cbf8704cb42e66494b788ba6ed4bb255fb0cc327e4f2190fae50c0ed9f336c0ff0
34 KiB
Executable File
34 KiB
Executable File