test: Fix intermittent issue in wallet_assumeutxo.py

This commit is contained in:
MarcoFalke
2026-03-04 09:35:21 +01:00
parent 2702711c3a
commit faa68ed4bd
2 changed files with 19 additions and 23 deletions

View File

@@ -721,6 +721,16 @@ def find_vout_for_address(node, txid, addr):
raise RuntimeError("Vout not found for address: txid=%s, addr=%s" % (txid, addr))
def dumb_sync_blocks(*, src, dst, height=None):
"""Sync blocks between `src` and `dst` nodes via RPC submitblock up to height."""
height = height or src.getblockcount()
for i in range(dst.getblockcount() + 1, height + 1):
block_hash = src.getblockhash(i)
block = src.getblock(blockhash=block_hash, verbose=0)
dst.submitblock(block)
assert_equal(dst.getblockcount(), height)
def sync_txindex(test_framework, node):
test_framework.log.debug("Waiting for node txindex to sync")
sync_start = int(time.time())