diff --git a/test/functional/p2p_addr_relay.py b/test/functional/p2p_addr_relay.py index eea8ee5351c..65b21c0d505 100755 --- a/test/functional/p2p_addr_relay.py +++ b/test/functional/p2p_addr_relay.py @@ -402,8 +402,7 @@ class AddrTest(BitcoinTestFramework): def get_nodes_that_received_addr(self, peer, receiver_peer, addr_receivers, time_interval_1, time_interval_2): - # Clean addr response related to the initial getaddr. There is no way to avoid initial - # getaddr because the peer won't self-announce then. + # Clean addr response related to the initial getaddr. for addr_receiver in addr_receivers: addr_receiver.num_ipv4_received = 0 diff --git a/test/functional/p2p_addr_selfannouncement.py b/test/functional/p2p_addr_selfannouncement.py index 8ab75aaa068..631ecb4c00e 100755 --- a/test/functional/p2p_addr_selfannouncement.py +++ b/test/functional/p2p_addr_selfannouncement.py @@ -78,14 +78,16 @@ class AddrSelfAnnouncementTest(BitcoinTestFramework): self.self_announcement_test(outbound=True, addrv2=False) self.self_announcement_test(outbound=True, addrv2=True) - def inbound_connection_open_assertions(self, addr_receiver): + @staticmethod + def inbound_connection_open_assertions(addr_receiver): # In response to a GETADDR, we expect a message with the self-announcement # and an addr message containing the GETADDR response. assert_equal(addr_receiver.self_announcements_received, 1) assert_equal(addr_receiver.addr_messages_received, 2) assert_greater_than(addr_receiver.addresses_received, 1) - def outbound_connection_open_assertions(self, addr_receiver): + @staticmethod + def outbound_connection_open_assertions(addr_receiver): # We expect only the self-announcement. assert_equal(addr_receiver.self_announcements_received, 1) assert_equal(addr_receiver.addr_messages_received, 1)