mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
tests: Check that segwit inputs in psbt have both UTXO types
This commit is contained in:
parent
4600479058
commit
84d295e513
1 changed files with 4 additions and 0 deletions
|
@ -157,6 +157,10 @@ class PSBTTest(BitcoinTestFramework):
|
|||
# spend single key from node 1
|
||||
rawtx = self.nodes[1].walletcreatefundedpsbt([{"txid":txid,"vout":p2wpkh_pos},{"txid":txid,"vout":p2sh_p2wpkh_pos},{"txid":txid,"vout":p2pkh_pos}], {self.nodes[1].getnewaddress():29.99})['psbt']
|
||||
walletprocesspsbt_out = self.nodes[1].walletprocesspsbt(rawtx)
|
||||
# Make sure it has both types of UTXOs
|
||||
decoded = self.nodes[1].decodepsbt(walletprocesspsbt_out['psbt'])
|
||||
assert 'non_witness_utxo' in decoded['inputs'][0]
|
||||
assert 'witness_utxo' in decoded['inputs'][0]
|
||||
assert_equal(walletprocesspsbt_out['complete'], True)
|
||||
self.nodes[1].sendrawtransaction(self.nodes[1].finalizepsbt(walletprocesspsbt_out['psbt'])['hex'])
|
||||
|
||||
|
|
Loading…
Reference in a new issue