8000 Use infallible conversions: `Hash` -> `secp256k1::Message` by nph4rd · Pull Request #1118 · rust-bitcoin/rust-bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use infallible conversions: Hash -> secp256k1::Message #1118

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

Merged

Conversation

nph4rd
Copy link
Contributor
@nph4rd nph4rd commented Jul 21, 2022

Replaces all instances of secp256k1::Message::from_slice(_).expect(_) with secp256k1::Message::from(_). This also implements ThirtyTwoByteHash for TapSighashHash.

Closes #824

@nph4rd nph4rd force-pushed the infallible-hashes-to-secp256k-msg branch from 14e4829 to b67eba1 Compare July 21, 2022 16:16
@Kixunil Kixunil added the trivial Obvious, easy and quick to review (few lines or doc-only...) label Jul 21, 2022
Replace all instances of
`secp256k1::Message::from_slice(_).expect(_)` with
`secp256k1::Message::from(_)`.

Also adds an implementation of ThirtyTwoByteHash for
TapSighashHash.

Solves rust-bitcoin#824
@nph4rd nph4rd force-pushed the infallible-hashes-to-secp256k-msg branch from b67eba1 to aeede12 Compare July 21, 2022 16:27
@nph4rd nph4rd requested a review from Kixunil July 21, 2022 16:27
@nph4rd
Copy link
Contributor Author
nph4rd commented Jul 21, 2022

Force-pushed at aeede12 to reset default-features = false in secp256k1, as pointed out by @Kixunil.

Copy link
Collaborator
@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

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

ACK aeede12

@Kixunil Kixunil added code quality Makes code easier to understand and less likely to lead to problems one ack PRs that have one ACK, so one more can progress them labels Jul 21, 2022
Copy link
Member
@tcharding tcharding left a comment

Choose a reason for hiding this comment

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

ACK aeede12

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 aeede12

@apoelstra apoelstra merged commit f6e2d95 into rust-bitcoin:master Jul 21, 2022
ChallengeDev210 pushed a commit to ChallengeDev210/rust-bitcoin that referenced this pull request Aug 1, 2022
…sh` -> `secp256k1::Message`

aeede12 Infallible conversions: `Hash` -> `Message` (Arturo Marquez)

Pull request description:

  Replaces all instances of `secp256k1::Message::from_slice(_).expect(_)` with `secp256k1::Message::from(_)`. This also implements `ThirtyTwoByteHash` for `TapSighashHash`.

  Closes rust-bitcoin/rust-bitcoin#824

ACKs for top commit:
  Kixunil:
    ACK aeede12
  tcharding:
    ACK aeede12
  apoelstra:
    ACK aeede12

Tree-SHA512: cd392f0e93e2560680c579a889a46f7e4484380058b2d8d03b6ecec351d880efa9beea5e3be128158e9e26243b7dfcef1f48a448028d9155958a5af62bcc9ec2
@Kixunil Kixunil added this to the 0.29.0 milestone Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Makes code easier to understand and less likely to lead to problems one ack PRs that have one ACK, so one more can progress them trivial Obvious, easy and quick to review (few lines or doc-only...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use infallible conversions from hashes to secp256k1::Message
4 participants
0