Skip to content

Commit 0637b02

Browse files
committed
Ping regularly in p2p-segwit.py to keep connection alive
This pings regularly while building a big block in p2p-segwit.py, to prevent timeout
1 parent 24f72e9 commit 0637b02

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

qa/rpc-tests/p2p-segwit.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,9 @@ def sign_P2PK_witness_input(script, txTo, inIdx, hashtype, value, key):
13921392
block = self.build_next_block()
13931393
used_sighash_single_out_of_bounds = False
13941394
for i in range(NUM_TESTS):
1395+
# Ping regularly to keep the connection alive
1396+
if (not i % 100):
1397+
self.test_node.sync_with_ping()
13951398
# Choose random number of inputs to use.
13961399
num_inputs = random.randint(1, 10)
13971400
# Create a slight bias for producing more utxos

0 commit comments

Comments
 (0)