Skip to content

Implement MiniscriptKey for secp256k1 PublicKey #327

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
merged 1 commit into from
Mar 28, 2022
Merged

Implement MiniscriptKey for secp256k1 PublicKey #327

merged 1 commit into from
Mar 28, 2022

Conversation

dr-orlovsky
Copy link
Contributor

Closes #326

Copy link
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

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

Would like to see the doc-comment fixed because it says the opposite of what the code is doing.

src/lib.rs Outdated
@@ -155,6 +156,23 @@ pub trait MiniscriptKey: Clone + Eq + Ord + fmt::Debug + fmt::Display + hash::Ha
fn to_pubkeyhash(&self) -> Self::Hash;
}

impl MiniscriptKey for bitcoin::secp256k1::PublicKey {
/// `is_uncompressed` always returns `true`
Copy link
Member

Choose a reason for hiding this comment

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

The comment should be updated to say that this returns false.

Copy link
Contributor Author

@dr-orlovsky dr-orlovsky Mar 28, 2022

Choose a reason for hiding this comment

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

Sorry, false for negative statement (_un_compressed) broke my natural language processor. Fixed

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 0888fe9

Copy link
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

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

ACK 0888fe9

@sanket1729 sanket1729 merged commit 1f9affc into rust-bitcoin:master Mar 28, 2022
apoelstra added a commit that referenced this pull request Mar 30, 2022
05a71e2 Implement ToPublicKey for secp PublicKey (Dr Maxim Orlovsky)

Pull request description:

  When doing #327 this one got missed

ACKs for top commit:
  apoelstra:
    ACK 05a71e2
  sanket1729:
    ACK 05a71e2

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

Consider impl MiniscriptKey for secp256k1::PublicKey
3 participants