From ff56bb9b44387f7e20ae7de59087cf19ea216726 Mon Sep 17 00:00:00 2001 From: Glenn Willen Date: Tue, 30 Oct 2018 00:41:19 -0700 Subject: Add regression test for PSBT signing bug #14473 Github-Pull: #14588 Rebased-From: e13fea975d5e4ae961faba36379a1cdaf9e50c1c --- test/functional/rpc_psbt.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py index 7c8c6c9af0..92132addba 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -168,6 +168,13 @@ class PSBTTest(BitcoinTestFramework): assert tx_in["sequence"] > MAX_BIP125_RBF_SEQUENCE assert_equal(decoded_psbt["tx"]["locktime"], 0) + # Regression test for 14473 (mishandling of already-signed witness transaction): + psbtx_info = self.nodes[0].walletcreatefundedpsbt([{"txid":unspent["txid"], "vout":unspent["vout"]}], [{self.nodes[2].getnewaddress():unspent["amount"]+1}]) + complete_psbt = self.nodes[0].walletprocesspsbt(psbtx_info["psbt"]) + double_processed_psbt = self.nodes[0].walletprocesspsbt(complete_psbt["psbt"]) + assert_equal(complete_psbt, double_processed_psbt) + # We don't care about the decode result, but decoding must succeed. + self.nodes[0].decodepsbt(double_processed_psbt["psbt"]) # Make sure change address wallet does not have P2SH innerscript access to results in success # when attempting BnB coin selection -- cgit v1.2.3