aboutsummaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorJohnson Lau <jl2012@users.noreply.github.com>2016-09-24 16:26:26 +0800
committerMarcoFalke <falke.marco@gmail.com>2016-10-03 10:54:20 +0200
commit375437c26bba95e9c25b758a186a3370f1d5e15d (patch)
tree9c0bccec922f72f631cd304ff5b014391d9832a6 /qa
parenta916677ace1c214f1c87f3a383cdc0d38dee8831 (diff)
downloadbitcoin-375437c26bba95e9c25b758a186a3370f1d5e15d.tar.xz
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 Github-Pull: #8803 Rebased-From: 0637b02fce04c800acc6747687c91c9b22f642e5
Diffstat (limited to 'qa')
-rwxr-xr-xqa/rpc-tests/p2p-segwit.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py
index 8af46f0316..ada5fba7f3 100755
--- a/qa/rpc-tests/p2p-segwit.py
+++ b/qa/rpc-tests/p2p-segwit.py
@@ -1389,6 +1389,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