add mempool tests

This commit is contained in:
ca333
2019-10-02 23:57:21 +02:00
parent 95f35796b6
commit 41a7dcf549

View File

@@ -56,7 +56,7 @@ def sync_blocks(rpc_connections, wait=1):
def sync_mempools(rpc_connections, wait=1): def sync_mempools(rpc_connections, wait=1):
""" """
Wait until everybody has the same transactions in their memory Wait until everybody has the same transactions in their memory
pools pools, and has notified all internal listeners of them
""" """
while True: while True:
pool = set(rpc_connections[0].getrawmempool()) pool = set(rpc_connections[0].getrawmempool())
@@ -68,6 +68,14 @@ def sync_mempools(rpc_connections, wait=1):
break break
time.sleep(wait) 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 = {} bitcoind_processes = {}
def initialize_datadir(dirname, n): def initialize_datadir(dirname, n):