aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-08-23 17:50:36 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-08-23 17:49:13 +0200
commitfa5b58ea01fac1adb6336b8b6b5217193295c695 (patch)
tree6f6e360af9b44d17acff697f7bc46873c5865196
parentc81c6bf65b34eb91c98768e6b4f46e450ccfd779 (diff)
test: Avoid intermittent block download timeout in p2p_ibd_stalling
-rwxr-xr-xtest/functional/p2p_ibd_stalling.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/p2p_ibd_stalling.py b/test/functional/p2p_ibd_stalling.py
index 11cd8837f4..fa07873929 100755
--- a/test/functional/p2p_ibd_stalling.py
+++ b/test/functional/p2p_ibd_stalling.py
@@ -73,6 +73,7 @@ class P2PIBDStallingTest(BitcoinTestFramework):
peers = []
self.log.info("Check that a staller does not get disconnected if the 1024 block lookahead buffer is filled")
+ self.mocktime = int(time.time()) + 1
for id in range(NUM_PEERS):
peers.append(node.add_outbound_p2p_connection(P2PStaller(stall_block), p2p_idx=id, connection_type="outbound-full-relay"))
peers[-1].block_store = block_dict
@@ -85,7 +86,7 @@ class P2PIBDStallingTest(BitcoinTestFramework):
self.all_sync_send_with_ping(peers)
# If there was a peer marked for stalling, it would get disconnected
- self.mocktime = int(time.time()) + 3
+ self.mocktime += 3
node.setmocktime(self.mocktime)
self.all_sync_send_with_ping(peers)
assert_equal(node.num_test_p2p_connections(), NUM_PEERS)