Merge bitcoin/bitcoin#26954: test: Avoid rpc timeout in p2p_headers_sync_with_minchainwork

fa952fad2f test: Avoid rpc timeout in p2p_headers_sync_with_minchainwork (MarcoFalke)

Pull request description:

  When running a lot of tests in parallel, I get `JSONRPCException: 'generatetoaddress' RPC took longer than 30.000000 seconds.`

  The general recommendation, if running into timeouts, is to increase the `--timeout-factor`. However, I think that the default timeout values should be suitable to run the tests out of the box on reasonable hardware.

ACKs for top commit:
  fanquake:
    ACK fa952fad2f

Tree-SHA512: b7eeda54f8db900f077417c0431f659c67e686e2fc078f8c713e37ed75b8bc862814ce20e8400741638e35e224d7284ad16172bf5f82168f803376d0c9ec4524
pull/26961/head
MarcoFalke 2 years ago
commit 75e752f134
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

@ -27,6 +27,7 @@ NODE2_BLOCKS_REQUIRED = 2047
class RejectLowDifficultyHeadersTest(BitcoinTestFramework): class RejectLowDifficultyHeadersTest(BitcoinTestFramework):
def set_test_params(self): def set_test_params(self):
self.rpc_timeout *= 4 # To avoid timeout when generating BLOCKS_TO_MINE
self.setup_clean_chain = True self.setup_clean_chain = True
self.num_nodes = 4 self.num_nodes = 4
# Node0 has no required chainwork; node1 requires 15 blocks on top of the genesis block; node2 requires 2047 # Node0 has no required chainwork; node1 requires 15 blocks on top of the genesis block; node2 requires 2047

Loading…
Cancel
Save