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
Some additional inspectors on Script and Witness #2646
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 8522463247Details
💛 - Coveralls |
967cbf5
to
ac4db63
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.
ACK ac4db63 but will need to wait for next release. I think we should merge these as-is although they will be much clearer after we do script tagging.
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 ac4db63
/// Get the taproot control block following BIP341 rules. | ||
/// | ||
/// This does not guarantee that this represents a P2TR [`Witness`]. It | ||
/// merely gets the last or second to last element depending on the first | ||
/// byte of the last element being equal to 0x50. See | ||
/// [Script::is_p2tr](crate::blockdata::script::Script::is_p2tr) to | ||
/// check whether this is actually a Taproot witness. |
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.
In case you want it, a bunch of these docs could be cleaned up to look like this:
/// Gets the taproot control block following BIP341 rules.
///
/// This does not guarantee that this represents a P2TR [`Witness`]. It merely gets the last or
/// second to last element depending on the first byte of the last element being equal to 0x50.
///
/// See [`Script::is_p2tr`] to check whether this is actually a Taproot witness.
Bundled these because they are very similar. Got a bunch of larger changes coming up based on these. I've been using these for a while for TXHASH work.