mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-05 12:40:16 +02:00
Merge bitcoin/bitcoin#29933: test: Fix intermittent timeout in p2p_tx_download.py
fa6c300a9926a1d35fdd0a80f59ea39769bd2596 test: Fix intermittent timeout in p2p_tx_download.py (MarcoFalke) Pull request description: Currently the test passes, but may fail during shutdown, because blocks and transactions are synced with `NUM_INBOUND` * `self.num_nodes` peers, which may take a long time. There is no need for this test to have this amount of inbounds. So avoid the extraneous inbounds to speed up the test and avoid the intermittent test failures. ACKs for top commit: instagibbs: ACK fa6c300a9926a1d35fdd0a80f59ea39769bd2596 fjahr: Thanks, ACK fa6c300a9926a1d35fdd0a80f59ea39769bd2596 achow101: ACK fa6c300a9926a1d35fdd0a80f59ea39769bd2596 theStack: ACK fa6c300a9926a1d35fdd0a80f59ea39769bd2596 Tree-SHA512: 0a480fd1db293ed8571ae629557cf81d5a79ec883e9e635f22c8a7cf48427161249ad2180b66c67661306f696c977b8e06ad520bd11911f119c9c95b3ffc9134
This commit is contained in:
commit
10bd32a1c9
@ -284,17 +284,22 @@ class TxDownloadTest(BitcoinTestFramework):
|
||||
|
||||
# Run each test against new bitcoind instances, as setting mocktimes has long-term effects on when
|
||||
# the next trickle relay event happens.
|
||||
for test in [self.test_in_flight_max, self.test_inv_block, self.test_tx_requests,
|
||||
self.test_rejects_filter_reset]:
|
||||
for test, with_inbounds in [
|
||||
(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.start_nodes()
|
||||
self.connect_nodes(1, 0)
|
||||
# Setup the p2p connections
|
||||
self.peers = []
|
||||
for node in self.nodes:
|
||||
for _ in range(NUM_INBOUND):
|
||||
self.peers.append(node.add_p2p_connection(TestP2PConn()))
|
||||
self.log.info("Nodes are setup with {} incoming connections each".format(NUM_INBOUND))
|
||||
if with_inbounds:
|
||||
for node in self.nodes:
|
||||
for _ in range(NUM_INBOUND):
|
||||
self.peers.append(node.add_p2p_connection(TestP2PConn()))
|
||||
self.log.info("Nodes are setup with {} incoming connections each".format(NUM_INBOUND))
|
||||
test()
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user