From 4c1fa6b28c292dcaf11d605e0e8c2bbf59cc4de4 Mon Sep 17 00:00:00 2001 From: glozow Date: Thu, 16 Jan 2025 14:10:23 -0500 Subject: [PATCH] test fix: make peer who sends MSG_TX announcement non-wtxidrelay Otherwise, it is not meaningful to test whether the announcement is ignored, because *all* announcements of this type are ignored. --- test/functional/p2p_orphan_handling.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/functional/p2p_orphan_handling.py b/test/functional/p2p_orphan_handling.py index 17128a6a11c..0805764a8ee 100755 --- a/test/functional/p2p_orphan_handling.py +++ b/test/functional/p2p_orphan_handling.py @@ -66,8 +66,8 @@ def cleanup(func): class PeerTxRelayer(P2PTxInvStore): """A P2PTxInvStore that also remembers all of the getdata and tx messages it receives.""" - def __init__(self): - super().__init__() + def __init__(self, wtxidrelay=True): + super().__init__(wtxidrelay=wtxidrelay) self._tx_received = [] self._getdata_received = [] @@ -402,7 +402,7 @@ class OrphanHandlingTest(BitcoinTestFramework): node = self.nodes[0] peer1 = node.add_p2p_connection(PeerTxRelayer()) peer2 = node.add_p2p_connection(PeerTxRelayer()) - peer3 = node.add_p2p_connection(PeerTxRelayer()) + peer3 = node.add_p2p_connection(PeerTxRelayer(wtxidrelay=False)) self.log.info("Test that an orphan with rejected parents, along with any descendants, cannot be retried with an alternate witness") parent_low_fee_nonsegwit = self.wallet_nonsegwit.create_self_transfer(fee_rate=0)