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 new serialized pubkey type #2156

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

ffranr
Copy link
Contributor

@ffranr ffranr commented Apr 2, 2024

This commit adds a new type called SerializedKey.

A serialized type is useful when using public keys as map keys. This is because functionally identical public keys can have different internal representations. These differences would cause the map to treat them as different keys.

Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

btcec/pubkey.go Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Apr 2, 2024

Pull Request Test Coverage Report for Build 8528940528

Details

  • 0 of 20 (0.0%) changed or added relevant lines in 1 file are covered.
  • 42 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.09%) to 56.79%

Changes Missing Coverage Covered Lines Changed/Added Lines %
btcec/pubkey.go 0 20 0.0%
Files with Coverage Reduction New Missed Lines %
peer/peer.go 9 73.86%
wire/msgaddrv2.go 13 56.9%
wire/netaddressv2.go 20 74.45%
Totals Coverage Status
Change from base Build 8452827211: -0.09%
Covered Lines: 29393
Relevant Lines: 51757

💛 - Coveralls

@ffranr ffranr force-pushed the add-pubkey-serialized-type branch from 02c8bf7 to 373e335 Compare April 2, 2024 18:56
btcec/pubkey.go Outdated Show resolved Hide resolved
This commit adds a new type called `SerializedKey`.

A serialized type is useful when using public keys as map keys. This is
because functionally identical public keys can have different internal
representations. These differences would cause the map to treat them as
different keys.
@ffranr ffranr force-pushed the add-pubkey-serialized-type branch from 373e335 to 665eeb5 Compare April 2, 2024 20:19
@ffranr ffranr requested a review from Roasbeef April 2, 2024 20:19
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM ⏰

@Roasbeef
Copy link
Member

Will tag a new btcec version after this is merged.

@Roasbeef Roasbeef merged commit e4b32e0 into btcsuite:master Apr 10, 2024
3 checks passed
@Roasbeef
Copy link
Member

To github.com:btcsuite/btcd.git
 * [new tag]             btcec/v2.3.3 -> btcec/v2.3.3

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