Skip to content

Commit e65d115

Browse files
ajtownssipa
authored andcommitted
test: request parents of orphan from wtxid relay peer
1 parent 900d7f6 commit e65d115

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/functional/p2p_segwit.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -2133,17 +2133,17 @@ def received_wtxidrelay():
21332133

21342134
# Send tx2 through; it's an orphan so won't be accepted
21352135
with mininode_lock:
2136-
self.tx_node.last_message.pop("getdata", None)
2137-
test_transaction_acceptance(self.nodes[0], self.tx_node, tx2, with_witness=True, accepted=False)
2136+
self.wtx_node.last_message.pop("getdata", None)
2137+
test_transaction_acceptance(self.nodes[0], self.wtx_node, tx2, with_witness=True, accepted=False)
21382138

2139-
# Expect a request for parent (tx) due to use of non-WTX peer
2140-
self.tx_node.wait_for_getdata([tx.sha256], 60)
2139+
# Expect a request for parent (tx) by txid despite use of WTX peer
2140+
self.wtx_node.wait_for_getdata([tx.sha256], 60)
21412141
with mininode_lock:
2142-
lgd = self.tx_node.lastgetdata[:]
2142+
lgd = self.wtx_node.lastgetdata[:]
21432143
assert_equal(lgd, [CInv(MSG_TX|MSG_WITNESS_FLAG, tx.sha256)])
21442144

21452145
# Send tx through
2146-
test_transaction_acceptance(self.nodes[0], self.tx_node, tx, with_witness=False, accepted=True)
2146+
test_transaction_acceptance(self.nodes[0], self.wtx_node, tx, with_witness=False, accepted=True)
21472147

21482148
# Check tx2 is there now
21492149
assert_equal(tx2.hash in self.nodes[0].getrawmempool(), True)

0 commit comments

Comments
 (0)