Skip to content

Commit 44d1153

Browse files
committed
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.
1 parent 60ac503 commit 44d1153

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/functional/wallet_reorgsrestore.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def run_test(self):
4545
txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), Decimal("10"))
4646
tx = self.nodes[0].gettransaction(txid)
4747
self.generate(self.nodes[0], 4, sync_fun=self.no_op)
48+
self.sync_blocks([self.nodes[0], self.nodes[2]])
4849
tx_before_reorg = self.nodes[0].gettransaction(txid)
4950
assert_equal(tx_before_reorg["confirmations"], 4)
5051

0 commit comments

Comments
 (0)