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

Add Conversion from Affine to PublicKey #80

Merged
merged 4 commits into from
Sep 15, 2021

Conversation

Gauthamastro
Copy link
Contributor

PR adds core::convert From trait for PublicKey to convert an Affine to PublicKey

athei
athei previously approved these changes Sep 13, 2021
Copy link
Member

@athei athei left a comment

Choose a reason for hiding this comment

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

I see no harm in merging this. But @sorpaas should know.

Copy link
Member

@sorpaas sorpaas left a comment

Choose a reason for hiding this comment

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

An affine may be invalid when converting to a public key. I'd prefer we use TryFrom instead.

@athei athei dismissed their stale review September 13, 2021 12:54

See sorpaas' comment.

@Gauthamastro
Copy link
Contributor Author

@sorpaas I have implemented TryFrom, not really sure if my "if" condition is correct. Let me know

src/lib.rs Outdated Show resolved Hide resolved
@sorpaas
Copy link
Member

sorpaas commented Sep 14, 2021

Please also revert those formatting change. I'm not sure it's correct since the code should have been rustfmt-ed.

Copy link
Contributor

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

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

There are many white space changes here that don't seem relevant to the PR. Do you mind reverting those?

@Gauthamastro
Copy link
Contributor Author

@sorpaas @dvdplm I have fixed the formatting issue =)

@sorpaas sorpaas merged commit 7d8bc3a into paritytech:master Sep 15, 2021
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.

4 participants