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

Manually implement is_uncompressed for BitcoinKey #666

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

tcharding
Copy link
Member

The interpreter::BitcoinKey uses the default implementation of MiniscriptKey, which means is_uncompressed returns false. However if the full key is a bitcoin::PublicKey it may be compressed.

Manually implement MiniscriptKey::is_uncompressed for BitcoinKey and return the compressedness of the inner full key.

Originally done, and discussed, in #620.

The `interpreter::BitcoinKey` uses the default implementation of
`MiniscriptKey`, which means `is_uncompressed` returns `false`. However
if the full key is a `bitcoin::PublicKey` it may be compressed.

Manually implement `MiniscriptKey::is_uncompressed` for `BitcoinKey` and
return the compressedness of the inner full key.
@apoelstra
Copy link
Member

We may want to just remove the default impl. I think it may have been there to avoid a breaking change in the trait a long time ago.

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 52198dd

@apoelstra apoelstra merged commit 481784e into rust-bitcoin:master Mar 28, 2024
16 checks passed
@tcharding tcharding deleted the 03-28-is-uncompressed branch April 1, 2024 03:49
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