aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/util.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-01-16 20:16:22 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-01-17 16:44:32 -0500
commitfa1e69e52bf8de08b1ce7a774416aa7a8d20068b (patch)
tree1ea4464d1cf8ebb220977146936ab743f16e4445 /test/functional/test_framework/util.py
parent66e3af709dd444b2d85e15c56f4608c700ff82ee (diff)
downloadbitcoin-fa1e69e52bf8de08b1ce7a774416aa7a8d20068b.tar.xz
qa: Sync with validationinterface queue in sync_mempools
Diffstat (limited to 'test/functional/test_framework/util.py')
-rw-r--r--test/functional/test_framework/util.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py
index 664dc6d0af..7fdc171332 100644
--- a/test/functional/test_framework/util.py
+++ b/test/functional/test_framework/util.py
@@ -390,7 +390,7 @@ def sync_chain(rpc_connections, *, wait=1, timeout=60):
timeout -= wait
raise AssertionError("Chain sync failed: Best block hashes don't match")
-def sync_mempools(rpc_connections, *, wait=1, timeout=60):
+def sync_mempools(rpc_connections, *, wait=1, timeout=60, flush_scheduler=True):
"""
Wait until everybody has the same transactions in their memory
pools
@@ -402,6 +402,9 @@ def sync_mempools(rpc_connections, *, wait=1, timeout=60):
if set(rpc_connections[i].getrawmempool()) == pool:
num_match = num_match + 1
if num_match == len(rpc_connections):
+ if flush_scheduler:
+ for r in rpc_connections:
+ r.syncwithvalidationinterfacequeue()
return
time.sleep(wait)
timeout -= wait