Skip to content

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
chain-forgexcr45 added a commit to chain-forgexcr45/rust-secp256k1 that referenced this pull request Sep 28, 2025
…nature

e275166652cc2366480a8e1f469b9b65704ac784 derive Hash for RecoverableSignature (NicolaLS)

Pull request description:

  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

ACKs for top commit:
  apoelstra:
    ACK e275166652cc2366480a8e1f469b9b65704ac784

Tree-SHA512: 418337e16e82a5e736c54d123450fdb164f4776db68952cf8095b36c501436446542821d554fa781dffa0f9067fc2464833a6c461897e655ff4449018da12ca2
william2332-limf added a commit to william2332-limf/rust-secp256k1 that referenced this pull request Oct 2, 2025
…nature

e275166652cc2366480a8e1f469b9b65704ac784 derive Hash for RecoverableSignature (NicolaLS)

Pull request description:

  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

ACKs for top commit:
  apoelstra:
    ACK e275166652cc2366480a8e1f469b9b65704ac784

Tree-SHA512: 418337e16e82a5e736c54d123450fdb164f4776db68952cf8095b36c501436446542821d554fa781dffa0f9067fc2464833a6c461897e655ff4449018da12ca2
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.

2 participants