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
Introduce DeferredSignatureChecker and have SignatureExtractorClass subclass it #21166
Conversation
9194ef6
to
6713a3c
Compare
Some test coverage might be good (if this solves the issue). |
6713a3c
to
5a63b47
Compare
I've added test cases (one CSV, one CLTV) for this. |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
I think it would be a bit cleaner and more flexible to have a That has the advance of just being able to use the |
Introduces a DeferringSignatureChecker which simply takes a BaseSignatureChecker and passes through everything. SignatureExtractorChecker now subclasses DeferringSignatureChecker. This allows for all BaseSignatureChecker functions to be implemented for SignatureExtractorChecker, while allowing for future signature checkers which opreate similarly to SignatureExtractorChecker.
Implemented @sipa's suggestion |
750cfea
to
a97a929
Compare
utACK a97a929 |
Marked for backport |
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.
{ | ||
return m_checker.CheckLockTime(nLockTime); | ||
} | ||
bool CheckSequence(const CScriptNum& nSequence) const override |
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.
style nit: newline
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.
utACK a97a929
…atureExtractorClass subclass it a97a929 Test that signrawtx works when a signed CSV and CLTV inputs are present (Andrew Chow) 6965456 Introduce DeferringSignatureChecker and inherit with SignatureExtractor (Andrew Chow) Pull request description: Previously SignatureExtractorChecker took a MutableTransactionSignatureChecker and passed through function calls to that. However not all functions were implemented so not everything passed through as it should have. To solve this, SignatureExctractorChecker now implements all of those functions via a new class - DeferredSignatureChecker. DeferredSignatureChecker is introduced to allow for future signature checkers which use another SignatureChecker but need to be able to do somethings outside of just the signature checking. Fixes bitcoin#21151 ACKs for top commit: sipa: utACK a97a929 meshcollider: Code review ACK a97a929 instagibbs: utACK a97a929 Tree-SHA512: bca784c75c2fc3fcb74e81f4e3ff516699e8debaa2db81e12843abdfe9cf265dac11db8619751cb9b3e9bbe779805d029fabe5f3cbca5e86bfd72de3664b0b94
Introduces a DeferringSignatureChecker which simply takes a BaseSignatureChecker and passes through everything. SignatureExtractorChecker now subclasses DeferringSignatureChecker. This allows for all BaseSignatureChecker functions to be implemented for SignatureExtractorChecker, while allowing for future signature checkers which opreate similarly to SignatureExtractorChecker. Github-Pull: bitcoin#21166 Rebased-From: 6965456
Github-Pull: bitcoin#21166 Rebased-From: a97a929
Backported in #21640 |
…atureExtractorClass subclass it f79189c Test that signrawtx works when a signed CSV and CLTV inputs are present (Andrew Chow) 7de019b Introduce DeferringSignatureChecker and inherit with SignatureExtractor (Andrew Chow) Pull request description: Backport of #21166 ACKs for top commit: MarcoFalke: checked this is a clean cherry-pick did not review ACK f79189c 🐖 instagibbs: ACK f79189c Tree-SHA512: 51e945c9b353713423d3886c557066c66a6517d2300523832e5a5471ab91a8943385096d9bf5b46910477cb4c47470431690cf3da09b9f6956fe030f13ddff51
Previously SignatureExtractorChecker took a MutableTransactionSignatureChecker and passed through function calls to that. However not all functions were implemented so not everything passed through as it should have. To solve this, SignatureExctractorChecker now implements all of those functions via a new class - DeferredSignatureChecker. DeferredSignatureChecker is introduced to allow for future signature checkers which use another SignatureChecker but need to be able to do somethings outside of just the signature checking.
Fixes #21151