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

derive Hash for RecoverableSignature #462

Merged
merged 1 commit into from Jun 27, 2022

Conversation

NicolaLS
Copy link
Contributor

It would be nice to also derive Hash for RecoverableSignature so data structures containing it don't have to implement it themself if they need to derive Hash

@apoelstra
Copy link
Member

I'm gonna go ahead and merge this, since for most cases it won't matter at all, but strictly speaking we should impl this by calling the ffi _serialize method first, since different versions of the library (or the same version on different endianness) may have different encodings for the internal data of this type.

But because the output of std::Hash is basically never stored or exported in any fashion, only used as a key inside hash maps/sets, I'm happy to leave that for a future PR.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e275166

@apoelstra apoelstra merged commit 2b8297a into rust-bitcoin:master Jun 27, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants