mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-10 06:39:15 +02:00
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.
This commit is contained in:
@@ -83,7 +83,7 @@ class PSBTTest(BitcoinTestFramework):
|
|||||||
wallet = node.get_wallet_rpc(self.default_wallet_name)
|
wallet = node.get_wallet_rpc(self.default_wallet_name)
|
||||||
address = wallet.getnewaddress()
|
address = wallet.getnewaddress()
|
||||||
wallet.sendtoaddress(address=address, amount=1.0)
|
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])
|
utxos = wallet.listunspent(addresses=[address])
|
||||||
psbt = wallet.createpsbt([{"txid": utxos[0]["txid"], "vout": utxos[0]["vout"]}], [{wallet.getnewaddress(): 0.9999}])
|
psbt = wallet.createpsbt([{"txid": utxos[0]["txid"], "vout": utxos[0]["vout"]}], [{wallet.getnewaddress(): 0.9999}])
|
||||||
|
|||||||
Reference in New Issue
Block a user