|
|
|
@ -410,7 +410,10 @@ def sync_blocks(rpc_connections, *, wait=1, timeout=60):
|
|
|
|
|
# Check that each peer has at least one connection
|
|
|
|
|
assert (all([len(x.getpeerinfo()) for x in rpc_connections]))
|
|
|
|
|
time.sleep(wait)
|
|
|
|
|
raise AssertionError("Block sync timed out:{}".format("".join("\n {!r}".format(b) for b in best_hash)))
|
|
|
|
|
raise AssertionError("Block sync timed out after {}s:{}".format(
|
|
|
|
|
timeout,
|
|
|
|
|
"".join("\n {!r}".format(b) for b in best_hash),
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def sync_mempools(rpc_connections, *, wait=1, timeout=60, flush_scheduler=True):
|
|
|
|
@ -429,11 +432,16 @@ def sync_mempools(rpc_connections, *, wait=1, timeout=60, flush_scheduler=True):
|
|
|
|
|
# Check that each peer has at least one connection
|
|
|
|
|
assert (all([len(x.getpeerinfo()) for x in rpc_connections]))
|
|
|
|
|
time.sleep(wait)
|
|
|
|
|
raise AssertionError("Mempool sync timed out:{}".format("".join("\n {!r}".format(m) for m in pool)))
|
|
|
|
|
raise AssertionError("Mempool sync timed out after {}s:{}".format(
|
|
|
|
|
timeout,
|
|
|
|
|
"".join("\n {!r}".format(m) for m in pool),
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Transaction/Block functions
|
|
|
|
|
#############################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def find_output(node, txid, amount, *, blockhash=None):
|
|
|
|
|
"""
|
|
|
|
|
Return index to output of txid with value amount
|
|
|
|
|