aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-06-08 19:27:16 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-06-24 16:32:20 -0400
commit84d295e51341a126a6c3cbeea7a8caa04c7b5bc3 (patch)
treed0e9ed953f8845e91f45e6554809f96ea4980143 /test/functional
parent46004790588c24174a0bec49b540d158ce163ffd (diff)
tests: Check that segwit inputs in psbt have both UTXO types
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/rpc_psbt.py4
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'])