func test: wait for block heights to match

This is copied from darosior's changes in
https://github.com/wizardsardine/liana/pull/1222#issuecomment-2324894986.
This commit is contained in:
Michael Mallan 2024-09-02 17:24:56 +01:00
parent ada89c5c56
commit b630d46770
No known key found for this signature in database
GPG Key ID: 5177CDCEDB0EABEB

View File

@ -902,6 +902,9 @@ def test_create_recovery(lianad, bitcoind):
bitcoind.generate_block(9, wait_for_mempool=txid)
# Now we can create a recovery tx that sweeps the first 3 coins.
wait_for(
lambda: lianad.rpc.getinfo()["block_height"] == bitcoind.rpc.getblockcount()
)
res = lianad.rpc.createrecovery(bitcoind.rpc.getnewaddress(), 18)
reco_psbt = PSBT.from_base64(res["psbt"])