aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Zumsande <mzumsande@gmail.com>2023-10-11 14:28:37 -0400
committerMartin Zumsande <mzumsande@gmail.com>2023-10-11 14:31:13 -0400
commit9cfc1c94407359379f10906affd2b837851c1b84 (patch)
tree91f7bc9485322c5978585a75e4a50db97a1ba82d /test
parent88c33c6748da3c4fdadc554ebca43ce7267e9178 (diff)
test: check that we don't send a getaddr msg to an inbound peer
Co-authored-by: pablomartin4btc <pablomartin4btc@gmail.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/p2p_addr_relay.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/p2p_addr_relay.py b/test/functional/p2p_addr_relay.py
index 63cd10896d..2adcaf178c 100755
--- a/test/functional/p2p_addr_relay.py
+++ b/test/functional/p2p_addr_relay.py
@@ -270,15 +270,16 @@ class AddrTest(BitcoinTestFramework):
full_outbound_peer.sync_with_ping()
assert full_outbound_peer.getaddr_received()
- self.log.info('Check that we do not send a getaddr message upon connecting to a block-relay-only peer')
+ self.log.info('Check that we do not send a getaddr message to a block-relay-only or inbound peer')
block_relay_peer = self.nodes[0].add_outbound_p2p_connection(AddrReceiver(), p2p_idx=1, connection_type="block-relay-only")
block_relay_peer.sync_with_ping()
assert_equal(block_relay_peer.getaddr_received(), False)
- self.log.info('Check that we answer getaddr messages only from inbound peers')
inbound_peer = self.nodes[0].add_p2p_connection(AddrReceiver(send_getaddr=False))
inbound_peer.sync_with_ping()
+ assert_equal(inbound_peer.getaddr_received(), False)
+ self.log.info('Check that we answer getaddr messages only from inbound peers')
# Add some addresses to addrman
for i in range(1000):
first_octet = i >> 8