From 41a7dcf5497595f7da23c3203cbdf63886411d32 Mon Sep 17 00:00:00 2001 From: ca333 Date: Wed, 2 Oct 2019 23:57:21 +0200 Subject: [PATCH] add mempool tests --- qa/rpc-tests/test_framework/util.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index 6bcf4cd18..8e465287b 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -56,7 +56,7 @@ def sync_blocks(rpc_connections, wait=1): def sync_mempools(rpc_connections, wait=1): """ Wait until everybody has the same transactions in their memory - pools + pools, and has notified all internal listeners of them """ while True: pool = set(rpc_connections[0].getrawmempool()) @@ -68,6 +68,14 @@ def sync_mempools(rpc_connections, wait=1): break time.sleep(wait) + # Now that the mempools are in sync, wait for the internal + # notifications to finish + while True: + notified = [ x.getmempoolinfo()['fullyNotified'] for x in rpc_connections ] + if notified == [ True ] * len(notified): + break + time.sleep(wait) + bitcoind_processes = {} def initialize_datadir(dirname, n):