aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_psbt.py
diff options
context:
space:
mode:
authorGlenn Willen <gwillen@nerdnet.org>2018-10-30 00:41:19 -0700
committerGlenn Willen <gwillen@nerdnet.org>2018-11-01 12:14:21 -0700
commite13fea975d5e4ae961faba36379a1cdaf9e50c1c (patch)
tree4d1b5f6dc140bc5b29b6158a9f0387e241d53cd2 /test/functional/rpc_psbt.py
parent565500508aa5df0011109ebf375ba71b693fc7de (diff)
downloadbitcoin-e13fea975d5e4ae961faba36379a1cdaf9e50c1c.tar.xz
Add regression test for PSBT signing bug #14473
Diffstat (limited to 'test/functional/rpc_psbt.py')
-rwxr-xr-xtest/functional/rpc_psbt.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py
index fca910bf64..86b043176c 100755
--- a/test/functional/rpc_psbt.py
+++ b/test/functional/rpc_psbt.py
@@ -207,6 +207,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"])
# BIP 174 Test Vectors