mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Merge #6996: Add preciousblock RPC
5805ac8Add preciousblock tests (Pieter Wuille)5127c4fAdd preciousblock RPC (Pieter Wuille)
This commit is contained in:
@@ -137,6 +137,16 @@ def sync_blocks(rpc_connections, wait=1, timeout=60):
|
||||
maxheight = max(heights)
|
||||
raise AssertionError("Block sync failed")
|
||||
|
||||
def sync_chain(rpc_connections, wait=1):
|
||||
"""
|
||||
Wait until everybody has the same best block
|
||||
"""
|
||||
while True:
|
||||
counts = [ x.getbestblockhash() for x in rpc_connections ]
|
||||
if counts == [ counts[0] ]*len(counts):
|
||||
break
|
||||
time.sleep(wait)
|
||||
|
||||
def sync_mempools(rpc_connections, wait=1, timeout=60):
|
||||
"""
|
||||
Wait until everybody has the same transactions in their memory
|
||||
|
||||
Reference in New Issue
Block a user