fix(signer): respect allow_all_sighashes in SignerWrapper::sign_input#476
Merged
ValuedMammal merged 1 commit intoMay 26, 2026
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #476 +/- ##
==========================================
+ Coverage 80.05% 80.33% +0.27%
==========================================
Files 24 24
Lines 5360 5430 +70
Branches 244 248 +4
==========================================
+ Hits 4291 4362 +71
Misses 990 990
+ Partials 79 78 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a187c70 to
3f07adc
Compare
benthecarman
suggested changes
May 5, 2026
Contributor
Author
|
Makes more sense, I'll effect the changes as suggested. Much thanks @benthecarman |
3f07adc to
8c6d411
Compare
aagbotemi
reviewed
May 6, 2026
Collaborator
aagbotemi
left a comment
There was a problem hiding this comment.
Well done working on this @muhahahmad68. I left some reviews for you.
aagbotemi
reviewed
May 6, 2026
aagbotemi
reviewed
May 6, 2026
766b080 to
e05ea0f
Compare
ValuedMammal
reviewed
May 8, 2026
e05ea0f to
9e45c56
Compare
ValuedMammal
approved these changes
May 15, 2026
Collaborator
ValuedMammal
left a comment
There was a problem hiding this comment.
ACK 9e45c56; ran the tests locally
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.
Description
SignOptions::allow_all_sighashesis documented as controlling whether the signer will accept non-SIGHASH_ALLsighash types. However, the check only existed insideWallet::signas a PSBT-wide pre-flight guard. The underlyingSignerWrapper<PrivateKey>::sign_inputnever consulted it, meaning callers usingInputSignerorTransactionSignerdirectly could bypass the check entirely.Added a sighash guard in
SignerWrapper<PrivateKey>::sign_inputbefore thematch self.ctxdispatch. This ensures the check covers all signing contexts (Legacy, Segwitv0, Taproot) and all delegating implementations in a single place.Tests Added
SIGHASH_NONEandallow_all_sighashes: falsereturnsNonStandardSighashallow_all_sighashes: truepasses the guard successfullyFixes #469
Checklists
All Submissions:
just pbefore pushingNew Features:
Bugfixes: