aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/util.py
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-05-13 16:54:13 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-05-13 17:10:02 +0200
commit2cc1372190c01bc6aae70f94fcc3b81ae4f7aba3 (patch)
treed49994f9f96459811c7b1cacc0cc0b301aedc55b /qa/rpc-tests/util.py
parent484821870b5a92f64d3075cfd30757ea8bd29739 (diff)
parentb649e0395464a659f4b3485ec71d28dc95ba48bd (diff)
Merge pull request #5159
b649e03 Create new BlockPolicyEstimator for fee estimates (Alex Morcos)
Diffstat (limited to 'qa/rpc-tests/util.py')
-rw-r--r--qa/rpc-tests/util.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index 3b4a10e46b..997bbcc373 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -33,7 +33,7 @@ def check_json_precision():
if satoshis != 2000000000000003:
raise RuntimeError("JSON encode/decode loses precision")
-def sync_blocks(rpc_connections):
+def sync_blocks(rpc_connections, wait=1):
"""
Wait until everybody has the same block count
"""
@@ -41,9 +41,9 @@ def sync_blocks(rpc_connections):
counts = [ x.getblockcount() for x in rpc_connections ]
if counts == [ counts[0] ]*len(counts):
break
- time.sleep(1)
+ time.sleep(wait)
-def sync_mempools(rpc_connections):
+def sync_mempools(rpc_connections, wait=1):
"""
Wait until everybody has the same transactions in their memory
pools
@@ -56,7 +56,7 @@ def sync_mempools(rpc_connections):
num_match = num_match+1
if num_match == len(rpc_connections):
break
- time.sleep(1)
+ time.sleep(wait)
bitcoind_processes = {}