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

PublicKey and XOnlyPublicKey should not *derive* Debug #729

Closed
Kixunil opened this issue Aug 31, 2024 · 2 comments · Fixed by #745
Closed

PublicKey and XOnlyPublicKey should not *derive* Debug #729

Kixunil opened this issue Aug 31, 2024 · 2 comments · Fixed by #745
Labels

Comments

@Kixunil
Copy link
Collaborator

Kixunil commented Aug 31, 2024

It should be manually implemented to show the key as serialized. Otherwise it shows just the internal data which, for the purpose of debugging, is just a garbage. See also: rust-bitcoin/rust-bitcoin#3278

@Kixunil Kixunil added the bug label Aug 31, 2024
@apoelstra
Copy link
Member

For the purpose of debugging, is it garbage? I guess it depends on what level you are debugging at. If you are debugging this library then presumably you want the raw representation.

Weak concept ACK, but I can see either side on this one.

@Kixunil
Copy link
Collaborator Author

Kixunil commented Aug 31, 2024

If you really need to debug the internal representation you should use the FFI type which appropriately shows the internal representation. (But calling it out in the doc would be nice.)

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

Successfully merging a pull request may close this issue.

2 participants