fix: preserve previously finalized PSBT inputs#960
Merged
Conversation
Skip re-finalizing PSBT inputs that already have `final_script_sig` or `final_script_witness` which could cause a failure if re-finalized. See bitcoindevkit/bdk_wallet#488
Member
|
Yeah, I think this is probably the correct logic (if either field is set, then leave them alone). Didn't check that the unit test too carefully. In future, it's helpful if you can put unit/regression tests in a later commit, so I can use Queued for ack. Will need backport to 13.x. |
Contributor
Author
Noted! Thanks |
apoelstra
added a commit
that referenced
this pull request
May 25, 2026
7d2c3ae fix: preserve previously finalized PSBT inputs (Trevor Arjeski) Pull request description: This is a back-port of #960 to the 12.x branch. BDK still uses miniscript v12.x It preserves PSBT inputs that already have `final_script_sig` or `final_script_witness`, avoiding re-finalization failures when finalized inputs no longer contain fields such as `witness_script` or `partial_sigs`. ACKs for top commit: apoelstra: ACK 7d2c3ae; successfully ran local tests Tree-SHA512: 6877725b9a25567583eeac592efb9817cead502995c02e220d54b042f70e23c46f9f7b44ddf9be912a6e0a468634546fbaba4745ac01c409ba9661f32bbdb6c3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Skip re-finalizing PSBT inputs that already have
final_script_sigorfinal_script_witnesswhich could cause a failure if re-finalized.See bitcoindevkit/bdk_wallet#488
Fixes #958 and requires backport to v13.x