Skip to content

Commit 4c1fa6b

Browse files
committed
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.
1 parent 2da46b8 commit 4c1fa6b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/functional/p2p_orphan_handling.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ def wrapper(self):
6666

6767
class PeerTxRelayer(P2PTxInvStore):
6868
"""A P2PTxInvStore that also remembers all of the getdata and tx messages it receives."""
69-
def __init__(self):
70-
super().__init__()
69+
def __init__(self, wtxidrelay=True):
70+
super().__init__(wtxidrelay=wtxidrelay)
7171
self._tx_received = []
7272
self._getdata_received = []
7373

@@ -402,7 +402,7 @@ def test_orphan_inherit_rejection(self):
402402
node = self.nodes[0]
403403
peer1 = node.add_p2p_connection(PeerTxRelayer())
404404
peer2 = node.add_p2p_connection(PeerTxRelayer())
405-
peer3 = node.add_p2p_connection(PeerTxRelayer())
405+
peer3 = node.add_p2p_connection(PeerTxRelayer(wtxidrelay=False))
406406

407407
self.log.info("Test that an orphan with rejected parents, along with any descendants, cannot be retried with an alternate witness")
408408
parent_low_fee_nonsegwit = self.wallet_nonsegwit.create_self_transfer(fee_rate=0)

0 commit comments

Comments
 (0)