aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-12-09 07:01:20 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-12-09 07:01:57 +0100
commit90ef622ab534f1304b5b6f6bec3d179175de7c1c (patch)
tree0e66a8e04224225a72e532f8ad214146e341b8aa /test/functional
parente98d1d674091681f88c5872f3e3923e37ce81b00 (diff)
parent1583498fb6781c01ca2f33c09319ed793964c574 (diff)
Merge #20564: Don't send 'sendaddrv2' to pre-70016 software, and send before 'verack'
1583498fb6781c01ca2f33c09319ed793964c574 Send and require SENDADDRV2 before VERACK (Pieter Wuille) c5a89196602e43ebb1cdc9cd4f08d153419c13e1 Don't send 'sendaddrv2' to pre-70016 software (Pieter Wuille) Pull request description: BIP155 defines addrv2 and sendaddrv2 for all protocol versions, but some implementations reject messages they don't know. As a courtesy, don't send it to nodes with a version before 70016, as no software is known to support BIP155 that doesn't announce at least that protocol version number. Also move the sending of sendaddrv2 earlier (before sending verack), as proposed in https://github.com/bitcoin/bips/pull/1043. This has the side effect that local address broadcast of torv3 will work (as it'll only trigger after we know whether or not the peer supports addrv2). ACKs for top commit: MarcoFalke: ACK 1583498fb6781c01ca2f33c09319ed793964c574 jnewbery: ACK 1583498fb6781c01ca2f33c09319ed793964c574 jonatack: ACK 1583498fb6781c01ca2f33c09319ed793964c574 vasild: ACK 1583498 Tree-SHA512: 3bd5833fa8c8567b6dedd99e4a9b6bb71c127aa66d5284b217503c86d597dc59aa7382c41f3a4bf561bb658b89db81d1a7703a700eef4ffc17cb916660e23a82
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/test_framework/p2p.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/test_framework/p2p.py b/test/functional/test_framework/p2p.py
index 6846d31221..8b79a4dc2f 100755
--- a/test/functional/test_framework/p2p.py
+++ b/test/functional/test_framework/p2p.py
@@ -396,9 +396,9 @@ class P2PInterface(P2PConnection):
assert message.nVersion >= MIN_VERSION_SUPPORTED, "Version {} received. Test framework only supports versions greater than {}".format(message.nVersion, MIN_VERSION_SUPPORTED)
if message.nVersion >= 70016:
self.send_message(msg_wtxidrelay())
- self.send_message(msg_verack())
if self.support_addrv2:
self.send_message(msg_sendaddrv2())
+ self.send_message(msg_verack())
self.nServices = message.nServices
# Connection helper methods