Skip to content

core/identity: Implement Hash and Ord for PublicKey#2915

Merged
mxinden merged 12 commits intolibp2p:masterfrom
futpib:public-key-hash-ord
Sep 22, 2022
Merged

core/identity: Implement Hash and Ord for PublicKey#2915
mxinden merged 12 commits intolibp2p:masterfrom
futpib:public-key-hash-ord

Conversation

@futpib
Copy link
Copy Markdown
Contributor

@futpib futpib commented Sep 19, 2022

Description

Implemented Ord and Hash instances for PublicKey to enable putting them in a HashSet/BTreeSet.

Links to any relevant issues

Fixes #2910

Open Questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@futpib futpib marked this pull request as ready for review September 19, 2022 11:04
Copy link
Copy Markdown
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Thank you for working on this!

I've left a few comments :)

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
@futpib futpib force-pushed the public-key-hash-ord branch from 05f3000 to 8292a78 Compare September 19, 2022 23:08
Copy link
Copy Markdown
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Thanks for following up with this! Please see inline comment.

Copy link
Copy Markdown
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Thank you! :)

I've triggered CI. One last comment, otherwise this should be good to go in!

futpib and others added 2 commits September 21, 2022 10:41
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Copy link
Copy Markdown
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Thanks @futpib for the patch and @thomaseizinger for the guidance.

@mxinden
Copy link
Copy Markdown
Member

mxinden commented Sep 21, 2022

Interoperability test failures due to libp2p/test-plans#41. Merging here.

Copy link
Copy Markdown
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Oh, missed one thing.

@futpib futpib requested a review from mxinden September 21, 2022 19:31
@thomaseizinger thomaseizinger changed the title Implement Hash + Ord for PublicKey core/identity: Implement Hash and Ord for PublicKey Sep 22, 2022
@thomaseizinger
Copy link
Copy Markdown
Contributor

Fixed the merge conflicts :)
Let's get this in once CI passes!

@mxinden
Copy link
Copy Markdown
Member

mxinden commented Sep 22, 2022

Interoperability tests failing due to libp2p/test-plans#41. Merging here. Thanks @futpib!

@mxinden mxinden merged commit bcff814 into libp2p:master Sep 22, 2022
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.

Ord, Eq, Hash instances for PublicKey for use with collections (sets, maps)

3 participants