diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-06-08 19:27:16 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-06-24 16:32:20 -0400 |
commit | 84d295e51341a126a6c3cbeea7a8caa04c7b5bc3 (patch) | |
tree | d0e9ed953f8845e91f45e6554809f96ea4980143 /test/functional/rpc_psbt.py | |
parent | 46004790588c24174a0bec49b540d158ce163ffd (diff) |
tests: Check that segwit inputs in psbt have both UTXO types
Diffstat (limited to 'test/functional/rpc_psbt.py')
-rwxr-xr-x | test/functional/rpc_psbt.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py index 7703c4ecb1..e5e62fd646 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -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']) |