From 44d11532f80705b790bc6e28df9a96ac54b25f9b Mon Sep 17 00:00:00 2001 From: Martin Zumsande Date: Mon, 12 Feb 2024 15:27:15 -0500 Subject: [PATCH] test: fix intermittent failure in wallet_reorgrestore.py ...by adding a missing sync_blocks call. There was a race at node2 between connecting the block produced by node 0, and using -generate to create new blocks itself. In the failed run, the latter happened first, resulting in a final block height that was smaller by 1 than expected. --- test/functional/wallet_reorgsrestore.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/functional/wallet_reorgsrestore.py b/test/functional/wallet_reorgsrestore.py index 86a2905c723..4271f3e481e 100755 --- a/test/functional/wallet_reorgsrestore.py +++ b/test/functional/wallet_reorgsrestore.py @@ -45,6 +45,7 @@ class ReorgsRestoreTest(BitcoinTestFramework): txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), Decimal("10")) tx = self.nodes[0].gettransaction(txid) self.generate(self.nodes[0], 4, sync_fun=self.no_op) + self.sync_blocks([self.nodes[0], self.nodes[2]]) tx_before_reorg = self.nodes[0].gettransaction(txid) assert_equal(tx_before_reorg["confirmations"], 4)