test: fix sync function in rpc_psbt.py

It currently only syncs between the first two nodes,
which may do nothing when the block is created on the
third node.

Github-Pull: #32630
Rebased-From: 4df4df45d7
This commit is contained in:
Martin Zumsande
2025-05-28 10:59:10 -04:00
committed by fanquake
parent 17b31fc802
commit 646fa1d028

View File

@@ -79,7 +79,7 @@ class PSBTTest(BitcoinTestFramework):
wallet = node.get_wallet_rpc(self.default_wallet_name)
address = wallet.getnewaddress()
wallet.sendtoaddress(address=address, amount=1.0)
self.generate(node, nblocks=1, sync_fun=lambda: self.sync_all(self.nodes[:2]))
self.generate(node, nblocks=1)
utxos = wallet.listunspent(addresses=[address])
psbt = wallet.createpsbt([{"txid": utxos[0]["txid"], "vout": utxos[0]["vout"]}], [{wallet.getnewaddress(): 0.9999}])