From 36be978fc9b45980bc5376ea0f938cf8bf3467c6 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Wed, 26 Oct 2022 18:17:01 +0200 Subject: [PATCH] merge bitcoin#26396: Avoid SetTxRelay for feeler connections continuation of dash#6365 includes: - fa24239a (changes to `p2p_sendtxrcncl.py`) --- test/functional/p2p_sendtxrcncl.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/functional/p2p_sendtxrcncl.py b/test/functional/p2p_sendtxrcncl.py index 139cee40ca..275fab56f3 100755 --- a/test/functional/p2p_sendtxrcncl.py +++ b/test/functional/p2p_sendtxrcncl.py @@ -34,6 +34,12 @@ class SendTxrcnclReceiver(P2PInterface): def on_sendtxrcncl(self, message): self.sendtxrcncl_msg_received = message + +class P2PFeelerReceiver(SendTxrcnclReceiver): + def on_version(self, message): + pass # feeler connections can not send any message other than their own version + + class PeerTrackMsgOrder(P2PInterface): def __init__(self): super().__init__() @@ -151,6 +157,11 @@ class SendTxRcnclTest(BitcoinTestFramework): assert not peer.sendtxrcncl_msg_received peer.peer_disconnect() + self.log.info("SENDTXRCNCL should not be sent if feeler") + peer = self.nodes[0].add_outbound_p2p_connection(P2PFeelerReceiver(), p2p_idx=2, connection_type="feeler") + assert not peer.sendtxrcncl_msg_received + peer.peer_disconnect() + self.log.info('SENDTXRCNCL if block-relay-only triggers a disconnect') peer = self.nodes[0].add_outbound_p2p_connection( PeerNoVerack(), wait_for_verack=False, p2p_idx=3, connection_type="block-relay-only")