Skip to content

Commit e13fea9

Browse files
committed
Add regression test for PSBT signing bug #14473
1 parent 5655005 commit e13fea9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/functional/rpc_psbt.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,13 @@ def run_test(self):
207207
assert tx_in["sequence"] > MAX_BIP125_RBF_SEQUENCE
208208
assert_equal(decoded_psbt["tx"]["locktime"], 0)
209209

210+
# Regression test for 14473 (mishandling of already-signed witness transaction):
211+
psbtx_info = self.nodes[0].walletcreatefundedpsbt([{"txid":unspent["txid"], "vout":unspent["vout"]}], [{self.nodes[2].getnewaddress():unspent["amount"]+1}])
212+
complete_psbt = self.nodes[0].walletprocesspsbt(psbtx_info["psbt"])
213+
double_processed_psbt = self.nodes[0].walletprocesspsbt(complete_psbt["psbt"])
214+
assert_equal(complete_psbt, double_processed_psbt)
215+
# We don't care about the decode result, but decoding must succeed.
216+
self.nodes[0].decodepsbt(double_processed_psbt["psbt"])
210217

211218
# BIP 174 Test Vectors
212219

0 commit comments

Comments
 (0)