mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 03:53:22 +02:00
qa: Sync with validationinterface queue in sync_mempools
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user