Skip to content
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

Use Message::from #2631

Open
tcharding opened this issue Mar 25, 2024 · 2 comments
Open

Use Message::from #2631

tcharding opened this issue Mar 25, 2024 · 2 comments

Comments

@tcharding
Copy link
Member

In commit 678eee8d7388 Use Message::from_digest we replaced Message::from_digest_slice(hash.as_byte_array()) with Message::from_digest(hash.to_byte_array()) however we failed to notice that we can go one step further because the sighash hash types implement secp256k1::ThirtyTwoByteHash and use Message::from(hash).

@apoelstra
Copy link
Member

We definitely did not "fail to notice" this. The use of the ThirtyTwoByteHash trait is the cause of all our "dependency hole" problems related to coordinating rust-bitcoin releases, though I can never remember the exact mechanism of our pain.

@tcharding
Copy link
Member Author

tcharding commented Mar 25, 2024

I also forgot what it was exactly, linking to other discussion thread so we talk in one place. rust-bitcoin/rust-secp256k1#673 (comment)

I wrote this issue while trying to remember.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants