psbt: Clean up a few TODOs - #1043
Open
Abeeujah wants to merge 6 commits into
Open
Conversation
Member
|
CI is failing. |
Compares pubkey hashes via their byte representation, eliminating the need to roundtrip via Address, also eliminating a bug that could make partial sigs lose their compressed flag.
This removes the redundant assignment of EcdsaSighashType::All after the method call to Input::ecdsa_hash_ty. Input::ecdsa_hash_ty defaults to EcdsaSighashType::All if no EcdsaSighashType is specified.
This leverages Rust's Iterator and Option API to create the value at the point the find expression matches instead of doing the find and map in separate calls.
This patch replaces the for loop, match and if/else constructs used to finalize inputs, collect errors and report the errors; using Iterator::filter_map and bool::then_some.
- `finalizer::construct_tap_witness`: Satisfy Psbt Inputs using Iterators on the PsbtInputSatisfier. - `finalizer::interpreter_check`: Move ScriptBuf and Witness out of the for loop to prevent allocating per iteration. - `finalizer::finalize_input`: Collapse verbose if/else statements to `bool::then_some`.
Abeeujah
force-pushed
the
2026-02-wip
branch
from
September 3, 2026 21:06
01df9cb to
b3c091c
Compare
Contributor
Author
Sorry, my Indexing was off by one, It has been fixed. |
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.
This PR removes a few TODOs in the psbt module which were
blocked on upstream at the time, but now available in
rust-bitcoin 0.32.6 and adds a few other QOL refinements
to the PSBT module.