Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin/bitcoin#31383: test: Add missing node.setmocktime(self.…
…mocktime) to p2p_ibd_stalling.py faa16ed test: Add missing node.setmocktime(self.mocktime) to p2p_ibd_stalling.py (MarcoFalke) Pull request description: This was forgotten by myself in commit fa5b58e. This time, there is a diff to test, which fails on current master and passes with this pull request. ```diff diff --git a/src/net_processing.cpp b/src/net_processing.cpp index e503a68382..16438ebd08 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -112,9 +112,9 @@ static_assert(MAX_BLOCKTXN_DEPTH <= MIN_BLOCKS_TO_KEEP, "MAX_BLOCKTXN_DEPTH too * want to make this a per-peer adaptive value at some point. */ static const unsigned int BLOCK_DOWNLOAD_WINDOW = 1024; /** Block download timeout base, expressed in multiples of the block interval (i.e. 10 min) */ -static constexpr double BLOCK_DOWNLOAD_TIMEOUT_BASE = 1; +static constexpr double BLOCK_DOWNLOAD_TIMEOUT_BASE = .05; // 30 sec /** Additional block download timeout per parallel downloading peer (i.e. 5 min) */ -static constexpr double BLOCK_DOWNLOAD_TIMEOUT_PER_PEER = 0.5; +static constexpr double BLOCK_DOWNLOAD_TIMEOUT_PER_PEER = 0.; /** Maximum number of headers to announce when relaying blocks with headers message.*/ static const unsigned int MAX_BLOCKS_TO_ANNOUNCE = 8; /** Minimum blocks required to signal NODE_NETWORK_LIMITED */ diff --git a/test/functional/p2p_ibd_stalling.py b/test/functional/p2p_ibd_stalling.py index fa07873929..f8cdd8998c 100755 --- a/test/functional/p2p_ibd_stalling.py +++ b/test/functional/p2p_ibd_stalling.py @@ -82,6 +82,7 @@ class P2PIBDStallingTest(BitcoinTestFramework): # Need to wait until 1023 blocks are received - the magic total bytes number is a workaround in lack of an rpc # returning the number of downloaded (but not connected) blocks. bytes_recv = 172761 if not self.options.v2transport else 169692 + time.sleep(31); self.wait_until(lambda: self.total_bytes_recv_for_blocks() == bytes_recv) self.all_sync_send_with_ping(peers) ACKs for top commit: brunoerg: ACK faa16ed Tree-SHA512: 5a670e2dcf828ac83b721a3e20d897744cca50080b0583a8460a0d0c7bf2c2c988cf7e35f688dde6a3349f1c21cc83a16ea5242ed06a59d59a04130416690737
- Loading branch information