Skip to content

Conversation

@MozirDmitriy
Copy link
Contributor

IDFromPublicKey previously ignored the error returned by mh.Sum, assuming it could not fail for the supported algorithms. This change makes the function fail fast if multihash.Sum ever returns an error (for example due to future registry or parameter changes), instead of silently producing an invalid peer ID. Under normal conditions behavior stays the same, but the code is now more robust against go-multihash evolution.

@MarcoPolo MarcoPolo merged commit 636d44e into libp2p:master Jan 8, 2026
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.

2 participants