mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
test: Fix intermittent timeout in p2p_tx_download.py
This commit is contained in:
@@ -284,17 +284,22 @@ class TxDownloadTest(BitcoinTestFramework):
|
|||||||
|
|
||||||
# Run each test against new bitcoind instances, as setting mocktimes has long-term effects on when
|
# Run each test against new bitcoind instances, as setting mocktimes has long-term effects on when
|
||||||
# the next trickle relay event happens.
|
# the next trickle relay event happens.
|
||||||
for test in [self.test_in_flight_max, self.test_inv_block, self.test_tx_requests,
|
for test, with_inbounds in [
|
||||||
self.test_rejects_filter_reset]:
|
(self.test_in_flight_max, True),
|
||||||
|
(self.test_inv_block, True),
|
||||||
|
(self.test_tx_requests, True),
|
||||||
|
(self.test_rejects_filter_reset, False),
|
||||||
|
]:
|
||||||
self.stop_nodes()
|
self.stop_nodes()
|
||||||
self.start_nodes()
|
self.start_nodes()
|
||||||
self.connect_nodes(1, 0)
|
self.connect_nodes(1, 0)
|
||||||
# Setup the p2p connections
|
# Setup the p2p connections
|
||||||
self.peers = []
|
self.peers = []
|
||||||
for node in self.nodes:
|
if with_inbounds:
|
||||||
for _ in range(NUM_INBOUND):
|
for node in self.nodes:
|
||||||
self.peers.append(node.add_p2p_connection(TestP2PConn()))
|
for _ in range(NUM_INBOUND):
|
||||||
self.log.info("Nodes are setup with {} incoming connections each".format(NUM_INBOUND))
|
self.peers.append(node.add_p2p_connection(TestP2PConn()))
|
||||||
|
self.log.info("Nodes are setup with {} incoming connections each".format(NUM_INBOUND))
|
||||||
test()
|
test()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user