diff --git a/tests/test_rpc.py b/tests/test_rpc.py index dedc81bc4..9d9aef1ec 100644 --- a/tests/test_rpc.py +++ b/tests/test_rpc.py @@ -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"])