Skip to content

Commit

Permalink
test: Avoid intermittent block download timeout in p2p_ibd_stalling
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke committed Aug 23, 2024
1 parent c81c6bf commit fa5b58e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/functional/p2p_ibd_stalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def run_test(self):
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
Expand All @@ -85,7 +86,7 @@ def run_test(self):

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)
Expand Down

0 comments on commit fa5b58e

Please sign in to comment.