mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-03 18:26:15 +00:00
tests: Check that segwit inputs in psbt have both UTXO types
Github-Pull: #19215 Rebased-From: 84d295e51341a126a6c3cbeea7a8caa04c7b5bc3
This commit is contained in:
parent
3228b59b17
commit
cf0b5a933d
@ -134,6 +134,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…
x
Reference in New Issue
Block a user