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

impl Default for SerializedSignature doesn't seem to make sense #454

Closed
Kixunil opened this issue Jun 21, 2022 · 1 comment · Fixed by #458
Closed

impl Default for SerializedSignature doesn't seem to make sense #454

Kixunil opened this issue Jun 21, 2022 · 1 comment · Fixed by #458

Comments

@Kixunil
Copy link
Collaborator

Kixunil commented Jun 21, 2022

It's all zeroes, thus invalid signature. It's used in the implementation which could use MaybeUninit to avoid zeroing or, if we're too paranoid for that, there could be an internal constant ZEROED. If there's anyone actually using zeroed signatures we could make it pub.

@apoelstra
Copy link
Member

Oops! This dates back to #100 and was probbaly an oversight. It shouldn't exist.

apoelstra added a commit that referenced this issue Jun 22, 2022
b18f5d0 Removed `Default` from `SerializedSignature` (Martin Habovstiak)

Pull request description:

  `Default` was pointless, so it was replaced with internal
  `from_raw_parts` method which also checks the length.

  This commit also documents changes to `SerializedSignature`.

  Closes #454

ACKs for top commit:
  tcharding:
    utACK b18f5d0
  apoelstra:
    ACK b18f5d0

Tree-SHA512: 5ee32160721d4d22cfe7c5dcc433bf013fc78a350e86b3d8d42c207fec7f2bf11c47fce77269ae816567be77602fdc86231d86e2c62aa2d327540056ab445842
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 a pull request may close this issue.

2 participants