mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 12:23:34 -05:00
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.
This commit is contained in:
parent
2da46b88f0
commit
4c1fa6b28c
1 changed files with 3 additions and 3 deletions
|
@ -66,8 +66,8 @@ def cleanup(func):
|
||||||
|
|
||||||
class PeerTxRelayer(P2PTxInvStore):
|
class PeerTxRelayer(P2PTxInvStore):
|
||||||
"""A P2PTxInvStore that also remembers all of the getdata and tx messages it receives."""
|
"""A P2PTxInvStore that also remembers all of the getdata and tx messages it receives."""
|
||||||
def __init__(self):
|
def __init__(self, wtxidrelay=True):
|
||||||
super().__init__()
|
super().__init__(wtxidrelay=wtxidrelay)
|
||||||
self._tx_received = []
|
self._tx_received = []
|
||||||
self._getdata_received = []
|
self._getdata_received = []
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ class OrphanHandlingTest(BitcoinTestFramework):
|
||||||
node = self.nodes[0]
|
node = self.nodes[0]
|
||||||
peer1 = node.add_p2p_connection(PeerTxRelayer())
|
peer1 = node.add_p2p_connection(PeerTxRelayer())
|
||||||
peer2 = 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")
|
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)
|
parent_low_fee_nonsegwit = self.wallet_nonsegwit.create_self_transfer(fee_rate=0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue