Skip to content

Commit 56befa0

Browse files
committed
[tests] increase timeouts in sendheaders test
1 parent b0bfa23 commit 56befa0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/functional/sendheaders.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def run_test(self):
243243
if i == 0:
244244
# first request the block
245245
test_node.get_data([tip])
246-
test_node.wait_for_block(tip, timeout=5)
246+
test_node.wait_for_block(tip)
247247
elif i == 1:
248248
# next try requesting header and block
249249
test_node.get_headers(locator=[old_tip], hashstop=tip)
@@ -258,7 +258,7 @@ def run_test(self):
258258
new_block = create_block(tip, create_coinbase(height+1), block_time)
259259
new_block.solve()
260260
test_node.send_header_for_blocks([new_block])
261-
test_node.wait_for_getdata([new_block.sha256], timeout=5)
261+
test_node.wait_for_getdata([new_block.sha256])
262262
test_node.send_message(msg_block(new_block))
263263
test_node.sync_with_ping() # make sure this block is processed
264264
inv_node.clear_last_announcement()
@@ -297,18 +297,18 @@ def run_test(self):
297297
if j == 0:
298298
# Announce via inv
299299
test_node.send_block_inv(tip)
300-
test_node.wait_for_getheaders(timeout=5)
300+
test_node.wait_for_getheaders()
301301
# Should have received a getheaders now
302302
test_node.send_header_for_blocks(blocks)
303303
# Test that duplicate inv's won't result in duplicate
304304
# getdata requests, or duplicate headers announcements
305305
[ inv_node.send_block_inv(x.sha256) for x in blocks ]
306-
test_node.wait_for_getdata([x.sha256 for x in blocks], timeout=5)
306+
test_node.wait_for_getdata([x.sha256 for x in blocks])
307307
inv_node.sync_with_ping()
308308
else:
309309
# Announce via headers
310310
test_node.send_header_for_blocks(blocks)
311-
test_node.wait_for_getdata([x.sha256 for x in blocks], timeout=5)
311+
test_node.wait_for_getdata([x.sha256 for x in blocks])
312312
# Test that duplicate headers won't result in duplicate
313313
# getdata requests (the check is further down)
314314
inv_node.send_header_for_blocks(blocks)
@@ -495,7 +495,7 @@ def run_test(self):
495495
with mininode_lock:
496496
test_node.last_message.pop("getheaders", None)
497497
test_node.send_header_for_blocks([blocks[1]])
498-
test_node.wait_for_getheaders(timeout=1)
498+
test_node.wait_for_getheaders()
499499
test_node.send_header_for_blocks(blocks)
500500
test_node.wait_for_getdata([x.sha256 for x in blocks])
501501
[ test_node.send_message(msg_block(x)) for x in blocks ]
@@ -518,7 +518,7 @@ def run_test(self):
518518
with mininode_lock:
519519
test_node.last_message.pop("getheaders", None)
520520
test_node.send_header_for_blocks([blocks[i]])
521-
test_node.wait_for_getheaders(timeout=1)
521+
test_node.wait_for_getheaders()
522522

523523
# Next header will connect, should re-set our count:
524524
test_node.send_header_for_blocks([blocks[0]])
@@ -533,7 +533,7 @@ def run_test(self):
533533
with mininode_lock:
534534
test_node.last_message.pop("getheaders", None)
535535
test_node.send_header_for_blocks([blocks[i%len(blocks)]])
536-
test_node.wait_for_getheaders(timeout=1)
536+
test_node.wait_for_getheaders()
537537

538538
# Eventually this stops working.
539539
test_node.send_header_for_blocks([blocks[-1]])

0 commit comments

Comments
 (0)