diff options
| author | Johnson Lau <[email protected]> | 2016-09-24 16:26:26 +0800 |
|---|---|---|
| committer | Johnson Lau <[email protected]> | 2016-09-25 23:44:40 +0800 |
| commit | 0637b02fce04c800acc6747687c91c9b22f642e5 (patch) | |
| tree | 06f433fb415866ed066214697302ef6427d9d2f4 | |
| parent | Merge #8371: [Qt] Add out-of-sync modal info layer (diff) | |
| download | discoin-0637b02fce04c800acc6747687c91c9b22f642e5.tar.xz discoin-0637b02fce04c800acc6747687c91c9b22f642e5.zip | |
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
| -rwxr-xr-x | qa/rpc-tests/p2p-segwit.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py index 22ec0ad8c..5c1eb21b1 100755 --- a/qa/rpc-tests/p2p-segwit.py +++ b/qa/rpc-tests/p2p-segwit.py @@ -1392,6 +1392,9 @@ class SegWitTest(BitcoinTestFramework): block = self.build_next_block() used_sighash_single_out_of_bounds = False for i in range(NUM_TESTS): + # Ping regularly to keep the connection alive + if (not i % 100): + self.test_node.sync_with_ping() # Choose random number of inputs to use. num_inputs = random.randint(1, 10) # Create a slight bias for producing more utxos |