-
Notifications
You must be signed in to change notification settings - Fork 831
Add a method to psbt to compute find sighash type #847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8a07b3d
to
74f3e57
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good
src/util/psbt/map/input.rs
Outdated
@@ -191,6 +191,22 @@ impl PsbtSigHashType { | |||
} | |||
|
|||
impl Input { | |||
/// Returns sighash_type.ecdsa_hash_ty() is sighash_type exists else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation can updated as
/// Obtains the [EcdsaSigHashType
] for this input if one is specified. If no sighash type is specified, returns ...
///
/// Errors:
/// If the sighash type is not a standard ecdsa sighash type
Same comment for schnorr
You can cherry-pick #848 to get the CI working |
74f3e57
to
fee6ab6
Compare
Fixes rust-bitcoin#838: Add a utility method to psbt to compute find sighash type of a given input.
fee6ab6
to
4b1db0a
Compare
Hi @sanket1729, thanks for the fix! I cherry-picked the commit and fixed the documentation issue. |
You can remove the cherry-pick now :) |
ACK 4b1db0a934a8f795903fde9119aebf06c4aa740e but would prefer to see the cherry-pick removed. |
4b1db0a
to
fb04cab
Compare
removed the cherry-pick commit :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fb04cab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fb04cab
Fixes #838: Add a utility method to psbt to compute find sighash
type of a given input.
For now, I have changed my previous implementation as discussed in #838 to functional style code as suggested by @Kixunil.