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

feat: improve key lookup #7023

Merged
merged 1 commit into from Mar 23, 2020
Merged

feat: improve key lookup #7023

merged 1 commit into from Mar 23, 2020

Conversation

Stebalien
Copy link
Member

  • Support peer IDs encoded as CIDs.
  • Support looking up the identity key by peer ID.

@Stebalien Stebalien requested a review from hsanjuan March 23, 2020 19:00
Copy link
Contributor

@hsanjuan hsanjuan left a comment

Choose a reason for hiding this comment

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

Minor questions, lgtm otherwise.

@@ -170,7 +194,7 @@ func keylookup(self ci.PrivKey, kstore keystore.Keystore, k string) (ci.PrivKey,
return nil, err
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it not doing IDFromPrivateKey(privKey) directly?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just a couple of lines above, could not add comment directly there.

Copy link
Member Author

Choose a reason for hiding this comment

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

No idea. It may not have existed? I'll change that.

// First, check self.
pid, err := peer.IDFromPrivateKey(self)
if err != nil {
return nil, fmt.Errorf("failed to determine peer ID for private key")
Copy link
Contributor

Choose a reason for hiding this comment

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

Not including the original error message?

* Support peer IDs encoded as CIDs.
* Support looking up the identity key by peer ID.
@Stebalien Stebalien merged commit 65e2ce7 into master Mar 23, 2020
@hacdias hacdias deleted the fix/improve-key-lookup branch May 9, 2023 10:57
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.

None yet

2 participants