diff --git a/test/functional/wallet_import_rescan.py b/test/functional/wallet_import_rescan.py --- a/test/functional/wallet_import_rescan.py +++ b/test/functional/wallet_import_rescan.py @@ -184,6 +184,8 @@ variant.confirmation_height = self.nodes[0].getblockcount() variant.timestamp = self.nodes[0].getblockheader( self.nodes[0].getbestblockhash())["time"] + # Conclude sync before calling setmocktime to avoid timeouts + self.sync_all() # Generate a block further in the future (past the rescan window). assert_equal(self.nodes[0].getrawmempool(), []) diff --git a/test/functional/wallet_send.py b/test/functional/wallet_send.py --- a/test/functional/wallet_send.py +++ b/test/functional/wallet_send.py @@ -388,6 +388,7 @@ res = self.nodes[0].sendrawtransaction(hex) self.nodes[0].generate(1) assert_equal(self.nodes[0].gettransaction(txid)["confirmations"], 1) + self.sync_all() self.log.info("Lock unspents...") utxo1 = w0.listunspent()[0]