From cf0b5a933da540416b530ca6eb0259ab18cc6548 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 8 Jun 2020 19:27:16 -0400 Subject: tests: Check that segwit inputs in psbt have both UTXO types Github-Pull: #19215 Rebased-From: 84d295e51341a126a6c3cbeea7a8caa04c7b5bc3 --- test/functional/rpc_psbt.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py index 285c38161c..b8586f255c 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -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']) -- cgit v1.2.3