Browse Source

add mempool tests

sietch
ca333 5 years ago
parent
commit
41a7dcf549
  1. 10
      qa/rpc-tests/test_framework/util.py

10
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):

Loading…
Cancel
Save